|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.knipp.rritoolkit.SinglePort
public class SinglePort
implementation of the Port
interface that operates on a
single channel. The port may be used by multiple threads in parallel.
Field Summary | |
---|---|
private RegistryChannel |
channel
the channel |
private Codec |
codec
the codec |
Constructor Summary | |
---|---|
SinglePort(ChannelFactory factory)
constructor |
|
SinglePort(ChannelFactory factory,
Codec theCodec)
constructor |
|
SinglePort(RegistryChannel theChannel,
Codec theCodec)
constructor |
Method Summary | |
---|---|
Response |
execute(Request request)
"execute" a request, i.e. send it to the registry and wait for the response |
RegistryChannel |
getChannel()
return the channel that is used. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private RegistryChannel channel
private Codec codec
Constructor Detail |
---|
public SinglePort(ChannelFactory factory, Codec theCodec) throws java.io.IOException
factory
- the factory for the channeltheCodec
- the codec to use. If null
, a
default codec is used
java.io.IOException
- if no channel could be createdpublic SinglePort(RegistryChannel theChannel, Codec theCodec)
theChannel
- an already allocated channeltheCodec
- the codec to use. If null
, a
default codec is usedpublic SinglePort(ChannelFactory factory) throws java.io.IOException
factory
- the factory for the channel
java.io.IOException
- if no channel could be createdMethod Detail |
---|
public Response execute(Request request) throws java.io.IOException
execute
in interface Port
request
- the request
java.io.IOException
- if either the transmission or the reception failedpublic RegistryChannel getChannel()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |