public class CommandDatagramChannel extends CommandChannelSupport
datagramSize, headerMarshaller, name, replayAddress, sequenceGenerator, targetAddress, wireFormat
Constructor and Description |
---|
CommandDatagramChannel(UdpTransport transport,
OpenWireFormat wireFormat,
int datagramSize,
java.net.SocketAddress targetAddress,
DatagramHeaderMarshaller headerMarshaller,
java.nio.channels.DatagramChannel channel,
ByteBufferPool bufferPool) |
Modifier and Type | Method and Description |
---|---|
ByteBufferPool |
getBufferPool() |
int |
getReceiveCounter() |
Command |
read() |
void |
sendBuffer(int commandId,
java.lang.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,
java.net.SocketAddress address,
java.nio.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,
java.net.SocketAddress address) |
getDatagramSize, getHeaderMarshaller, getReplayAddress, getReplayBuffer, getTargetAddress, setDatagramSize, setHeaderMarshaller, setReplayAddress, setReplayBuffer, setTargetAddress, toString, write
public CommandDatagramChannel(UdpTransport transport, OpenWireFormat wireFormat, int datagramSize, java.net.SocketAddress targetAddress, DatagramHeaderMarshaller headerMarshaller, java.nio.channels.DatagramChannel channel, ByteBufferPool bufferPool)
public void start() throws java.lang.Exception
java.lang.Exception
public void stop() throws java.lang.Exception
java.lang.Exception
public void write(Command command, java.net.SocketAddress address) throws java.io.IOException
java.io.IOException
public ByteBufferPool getBufferPool()
public void setBufferPool(ByteBufferPool bufferPool)
protected void sendWriteBuffer(int commandId, java.net.SocketAddress address, java.nio.ByteBuffer writeBuffer, boolean redelivery) throws java.io.IOException
java.io.IOException
public void sendBuffer(int commandId, java.lang.Object buffer) throws java.io.IOException
Replayer
commandId
- the command IDbuffer
- the buffer to be sent - or null if the buffer no longer exists in the bufferjava.io.IOException
public int getReceiveCounter()
Copyright © 2005-2017. All Rights Reserved.