|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.knipp.rritoolkit.test.DebugChannelFactory.DebugChannel
private static class DebugChannelFactory.DebugChannel
wrapper class for a connection. Prints messages sent and received to the console.
Field Summary | |
---|---|
private RegistryChannel |
channel
the actual channel |
private int |
id
the ID of the channel |
Constructor Summary | |
---|---|
DebugChannelFactory.DebugChannel(RegistryChannel theChannel,
int theID)
constructor |
Method Summary | |
---|---|
void |
close()
close the channel. |
boolean |
isClosed()
return whether the channel has been closed |
byte[] |
receive()
wait for a response from the registry. |
void |
send(byte[] data,
boolean isXml)
send the given message to the registry. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private RegistryChannel channel
private int id
Constructor Detail |
---|
public DebugChannelFactory.DebugChannel(RegistryChannel theChannel, int theID)
theChannel
- the actual channeltheID
- the assigned IDMethod Detail |
---|
public void send(byte[] data, boolean isXml) throws java.io.IOException
send
in interface RegistryChannel
data
- the data representing the messageisXml
- true
if the message uses the
XML encoding, false
if the
message uses key-value pairs.
java.io.IOException
- if the transmission failedpublic byte[] receive() throws java.io.IOException
receive
in interface RegistryChannel
java.io.IOException
- if the connection has been closed either
before or during the call.public boolean isClosed()
isClosed
in interface RegistryChannel
true
if closedpublic void close()
close
in interface RegistryChannel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |