private static class DebugChannelFactory.DebugChannel extends java.lang.Object implements RegistryChannel
Modifier and Type | Field and Description |
---|---|
private RegistryChannel |
channel
the actual channel
|
private int |
id
the ID of the channel
|
Constructor and Description |
---|
DebugChannel(RegistryChannel theChannel,
int theID)
constructor
|
Modifier and Type | Method and Description |
---|---|
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.
|
private RegistryChannel channel
private int id
public DebugChannel(RegistryChannel theChannel, int theID)
theChannel
- the actual channeltheID
- the assigned IDpublic 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
Copyright © 2005-2013 Knipp Medien und Kommunikation GmbH