public class CommandDatagramChannel extends CommandChannelSupport
datagramSize, headerMarshaller, name, replayAddress, sequenceGenerator, targetAddress, wireFormat
Constructor and Description |
---|
CommandDatagramChannel(UdpTransport transport,
OpenWireFormat wireFormat,
int datagramSize,
SocketAddress targetAddress,
DatagramHeaderMarshaller headerMarshaller,
DatagramChannel channel,
ByteBufferPool bufferPool) |
Modifier and Type | Method and Description |
---|---|
ByteBufferPool |
getBufferPool() |
int |
getReceiveCounter() |
Command |
read() |
void |
sendBuffer(int commandId,
Object buffer)
Sends the given buffer back to the transport
if the buffer could be found - otherwise maybe send some kind
of exception
|
protected void |
sendWriteBuffer(int commandId,
SocketAddress address,
ByteBuffer writeBuffer,
boolean redelivery) |
void |
setBufferPool(ByteBufferPool bufferPool)
Sets the implementation of the byte buffer pool to use
|
void |
start() |
void |
stop() |
void |
write(Command command,
SocketAddress address) |
getDatagramSize, getHeaderMarshaller, getReplayAddress, getReplayBuffer, getTargetAddress, setDatagramSize, setHeaderMarshaller, setReplayAddress, setReplayBuffer, setTargetAddress, toString, write
public CommandDatagramChannel(UdpTransport transport, OpenWireFormat wireFormat, int datagramSize, SocketAddress targetAddress, DatagramHeaderMarshaller headerMarshaller, DatagramChannel channel, ByteBufferPool bufferPool)
public Command read() throws IOException
IOException
public void write(Command command, SocketAddress address) throws IOException
IOException
public ByteBufferPool getBufferPool()
public void setBufferPool(ByteBufferPool bufferPool)
protected void sendWriteBuffer(int commandId, SocketAddress address, ByteBuffer writeBuffer, boolean redelivery) throws IOException
IOException
public void sendBuffer(int commandId, Object buffer) throws IOException
Replayer
commandId
- the command IDbuffer
- the buffer to be sent - or null if the buffer no longer exists in the bufferIOException
public int getReceiveCounter()
Copyright © 2005–2016 FuseSource, Corp.. All rights reserved.