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, writepublic 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.Exceptionpublic void stop() throws java.lang.Exception
java.lang.Exceptionpublic void write(Command command, java.net.SocketAddress address) throws java.io.IOException
java.io.IOExceptionpublic 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.IOExceptionpublic void sendBuffer(int commandId, java.lang.Object buffer) throws java.io.IOException
ReplayercommandId - the command IDbuffer - the buffer to be sent - or null if the buffer no longer exists in the bufferjava.io.IOExceptionpublic int getReceiveCounter()
Copyright © 2005-2012. All Rights Reserved.