Class CommandChannelSupport
- java.lang.Object
-
- org.apache.activemq.transport.udp.CommandChannelSupport
-
- All Implemented Interfaces:
Service
,Replayer
,CommandChannel
- Direct Known Subclasses:
CommandDatagramChannel
,CommandDatagramSocket
public abstract class CommandChannelSupport extends Object implements CommandChannel
-
-
Field Summary
Fields Modifier and Type Field Description protected int
datagramSize
protected DatagramHeaderMarshaller
headerMarshaller
protected String
name
protected SocketAddress
replayAddress
protected IntSequenceGenerator
sequenceGenerator
protected SocketAddress
targetAddress
protected OpenWireFormat
wireFormat
-
Constructor Summary
Constructors Constructor Description CommandChannelSupport(UdpTransport transport, OpenWireFormat wireFormat, int datagramSize, SocketAddress targetAddress, DatagramHeaderMarshaller headerMarshaller)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getDatagramSize()
DatagramHeaderMarshaller
getHeaderMarshaller()
SocketAddress
getReplayAddress()
ReplayBuffer
getReplayBuffer()
SocketAddress
getTargetAddress()
void
setDatagramSize(int datagramSize)
Sets the default size of a datagram on the network.void
setHeaderMarshaller(DatagramHeaderMarshaller headerMarshaller)
void
setReplayAddress(SocketAddress replayAddress)
void
setReplayBuffer(ReplayBuffer replayBuffer)
void
setTargetAddress(SocketAddress targetAddress)
String
toString()
void
write(Command command)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.activemq.transport.udp.CommandChannel
getReceiveCounter, read, write
-
Methods inherited from interface org.apache.activemq.transport.reliable.Replayer
sendBuffer
-
-
-
-
Field Detail
-
wireFormat
protected OpenWireFormat wireFormat
-
datagramSize
protected int datagramSize
-
targetAddress
protected SocketAddress targetAddress
-
replayAddress
protected SocketAddress replayAddress
-
name
protected final String name
-
sequenceGenerator
protected final IntSequenceGenerator sequenceGenerator
-
headerMarshaller
protected DatagramHeaderMarshaller headerMarshaller
-
-
Constructor Detail
-
CommandChannelSupport
public CommandChannelSupport(UdpTransport transport, OpenWireFormat wireFormat, int datagramSize, SocketAddress targetAddress, DatagramHeaderMarshaller headerMarshaller)
-
-
Method Detail
-
write
public void write(Command command) throws IOException
- Throws:
IOException
-
getDatagramSize
public int getDatagramSize()
- Specified by:
getDatagramSize
in interfaceCommandChannel
-
setDatagramSize
public void setDatagramSize(int datagramSize)
Sets the default size of a datagram on the network.- Specified by:
setDatagramSize
in interfaceCommandChannel
-
getTargetAddress
public SocketAddress getTargetAddress()
-
setTargetAddress
public void setTargetAddress(SocketAddress targetAddress)
- Specified by:
setTargetAddress
in interfaceCommandChannel
-
getReplayAddress
public SocketAddress getReplayAddress()
-
setReplayAddress
public void setReplayAddress(SocketAddress replayAddress)
- Specified by:
setReplayAddress
in interfaceCommandChannel
-
getHeaderMarshaller
public DatagramHeaderMarshaller getHeaderMarshaller()
- Specified by:
getHeaderMarshaller
in interfaceCommandChannel
-
setHeaderMarshaller
public void setHeaderMarshaller(DatagramHeaderMarshaller headerMarshaller)
- Specified by:
setHeaderMarshaller
in interfaceCommandChannel
-
getReplayBuffer
public ReplayBuffer getReplayBuffer()
-
setReplayBuffer
public void setReplayBuffer(ReplayBuffer replayBuffer)
- Specified by:
setReplayBuffer
in interfaceCommandChannel
-
-