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, writepublic CommandDatagramChannel(UdpTransport transport, OpenWireFormat wireFormat, int datagramSize, SocketAddress targetAddress, DatagramHeaderMarshaller headerMarshaller, DatagramChannel channel, ByteBufferPool bufferPool)
public Command read() throws IOException
IOExceptionpublic void write(Command command, SocketAddress address) throws IOException
IOExceptionpublic ByteBufferPool getBufferPool()
public void setBufferPool(ByteBufferPool bufferPool)
protected void sendWriteBuffer(int commandId, SocketAddress address, ByteBuffer writeBuffer, boolean redelivery) throws IOException
IOExceptionpublic void sendBuffer(int commandId, Object buffer) throws IOException
ReplayercommandId - the command IDbuffer - the buffer to be sent - or null if the buffer no longer exists in the bufferIOExceptionpublic int getReceiveCounter()
Copyright © 2005–2020 The Apache Software Foundation. All rights reserved.