|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.activemq.util.ServiceSupport
org.apache.activemq.transport.TransportSupport
org.apache.activemq.transport.TransportThreadSupport
org.apache.activemq.transport.udp.UdpTransport
public class UdpTransport
An implementation of the Transport
interface using raw UDP
Constructor Summary | |
---|---|
protected |
UdpTransport(OpenWireFormat wireFormat)
|
|
UdpTransport(OpenWireFormat wireFormat,
int port)
Used by the server transport |
|
UdpTransport(OpenWireFormat wireFormat,
SocketAddress socketAddress)
|
|
UdpTransport(OpenWireFormat wireFormat,
URI remoteLocation)
|
Method Summary | |
---|---|
protected void |
bind(DatagramSocket socket,
SocketAddress localAddress)
|
protected DatagramChannel |
connect(DatagramChannel channel,
SocketAddress targetAddress2)
|
protected InetSocketAddress |
createAddress(URI remoteLocation)
Creates an address from the given URI |
protected CommandChannel |
createCommandChannel()
|
protected CommandChannel |
createCommandDatagramChannel()
|
protected DatagramHeaderMarshaller |
createDatagramHeaderMarshaller()
|
protected SocketAddress |
createLocalAddress()
|
Replayer |
createReplayer()
Creates a replayer for working with the reliable transport |
protected void |
doStart()
|
protected void |
doStop(ServiceStopper stopper)
|
ByteBufferPool |
getBufferPool()
|
protected DatagramChannel |
getChannel()
|
CommandChannel |
getCommandChannel()
|
int |
getDatagramSize()
|
InetSocketAddress |
getLocalSocketAddress()
|
int |
getMinmumWireFormatVersion()
|
int |
getPort()
|
protected String |
getProtocolName()
|
protected String |
getProtocolUriScheme()
|
String |
getRemoteAddress()
|
ReplayBuffer |
getReplayBuffer()
|
ReplayStrategy |
getReplayStrategy()
|
IntSequenceGenerator |
getSequenceGenerator()
|
protected SocketAddress |
getTargetAddress()
|
OpenWireFormat |
getWireFormat()
|
boolean |
isReplayEnabled()
|
boolean |
isTrace()
|
boolean |
isUseLocalHost()
|
void |
oneway(Object command)
A one way asynchronous send |
void |
oneway(Object command,
SocketAddress address)
A one way asynchronous send to a given address |
protected String |
resolveHostName(String host)
|
void |
run()
reads packets from a Socket |
void |
setBufferPool(ByteBufferPool bufferPool)
|
protected void |
setChannel(DatagramChannel channel)
|
void |
setCommandChannel(CommandDatagramChannel commandChannel)
Sets the implementation of the command channel to use. |
void |
setDatagramSize(int datagramSize)
|
void |
setMinmumWireFormatVersion(int minmumWireFormatVersion)
|
void |
setPort(int port)
Sets the port to connect on |
void |
setReplayBuffer(ReplayBuffer replayBuffer)
|
void |
setReplayEnabled(boolean replayEnabled)
Sets whether or not replay should be enabled when using the reliable transport. |
void |
setReplayStrategy(ReplayStrategy replayStrategy)
Sets the strategy used to replay missed datagrams |
void |
setSequenceGenerator(IntSequenceGenerator sequenceGenerator)
|
void |
setTargetEndpoint(Endpoint newTarget)
We have received the WireFormatInfo from the server on the actual channel we should use for all future communication with the server, so lets set the target to be the actual channel that the server has chosen for us to talk on. |
void |
setTrace(boolean trace)
|
void |
setUseLocalHost(boolean useLocalHost)
Sets whether 'localhost' or the actual local host name should be used to make local connections. |
String |
toString()
|
Methods inherited from class org.apache.activemq.transport.TransportThreadSupport |
---|
isDaemon, setDaemon |
Methods inherited from class org.apache.activemq.transport.TransportSupport |
---|
asyncRequest, checkStarted, doConsume, getTransportListener, narrow, onException, request, request, setTransportListener |
Methods inherited from class org.apache.activemq.util.ServiceSupport |
---|
dispose, isStarted, isStopped, isStopping, start, stop |
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.Transport |
---|
asyncRequest, getTransportListener, narrow, request, request, setTransportListener |
Methods inherited from interface org.apache.activemq.Service |
---|
start, stop |
Constructor Detail |
---|
protected UdpTransport(OpenWireFormat wireFormat) throws IOException
IOException
public UdpTransport(OpenWireFormat wireFormat, URI remoteLocation) throws UnknownHostException, IOException
UnknownHostException
IOException
public UdpTransport(OpenWireFormat wireFormat, SocketAddress socketAddress) throws IOException
IOException
public UdpTransport(OpenWireFormat wireFormat, int port) throws UnknownHostException, IOException
UnknownHostException
IOException
Method Detail |
---|
public Replayer createReplayer() throws IOException
IOException
public void oneway(Object command) throws IOException
oneway
in interface Transport
IOException
public void oneway(Object command, SocketAddress address) throws IOException
IOException
public String toString()
toString
in class Object
public void run()
run
in interface Runnable
public void setTargetEndpoint(Endpoint newTarget)
public boolean isTrace()
public void setTrace(boolean trace)
public int getDatagramSize()
public void setDatagramSize(int datagramSize)
public boolean isUseLocalHost()
public void setUseLocalHost(boolean useLocalHost)
public CommandChannel getCommandChannel() throws IOException
IOException
public void setCommandChannel(CommandDatagramChannel commandChannel)
public ReplayStrategy getReplayStrategy()
public void setReplayStrategy(ReplayStrategy replayStrategy)
public int getPort()
public void setPort(int port)
public int getMinmumWireFormatVersion()
public void setMinmumWireFormatVersion(int minmumWireFormatVersion)
public OpenWireFormat getWireFormat()
public IntSequenceGenerator getSequenceGenerator()
public void setSequenceGenerator(IntSequenceGenerator sequenceGenerator)
public boolean isReplayEnabled()
public void setReplayEnabled(boolean replayEnabled)
public ByteBufferPool getBufferPool()
public void setBufferPool(ByteBufferPool bufferPool)
public ReplayBuffer getReplayBuffer()
public void setReplayBuffer(ReplayBuffer replayBuffer) throws IOException
IOException
protected InetSocketAddress createAddress(URI remoteLocation) throws UnknownHostException, IOException
UnknownHostException
IOException
protected String resolveHostName(String host) throws UnknownHostException
UnknownHostException
protected void doStart() throws Exception
doStart
in class TransportThreadSupport
Exception
protected CommandChannel createCommandChannel() throws IOException
IOException
protected CommandChannel createCommandDatagramChannel()
protected void bind(DatagramSocket socket, SocketAddress localAddress) throws IOException
IOException
protected DatagramChannel connect(DatagramChannel channel, SocketAddress targetAddress2) throws IOException
IOException
protected SocketAddress createLocalAddress()
protected void doStop(ServiceStopper stopper) throws Exception
doStop
in class ServiceSupport
Exception
protected DatagramHeaderMarshaller createDatagramHeaderMarshaller()
protected String getProtocolName()
protected String getProtocolUriScheme()
protected SocketAddress getTargetAddress()
protected DatagramChannel getChannel()
protected void setChannel(DatagramChannel channel)
public InetSocketAddress getLocalSocketAddress()
public String getRemoteAddress()
getRemoteAddress
in interface Transport
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |