|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.activemq.transport.TransportServerChannelSupport
org.activemq.transport.tcp.TcpTransportServerChannel
public class TcpTransportServerChannel
Binds to a well known port and listens for Sockets ...
Field Summary | |
---|---|
protected static int |
DEFAULT_BACKLOG
|
Constructor Summary | |
---|---|
TcpTransportServerChannel(WireFormat wireFormat,
ServerSocket serverSocket)
|
|
TcpTransportServerChannel(WireFormat wireFormat,
URI bindAddr)
Default Constructor |
Method Summary | |
---|---|
protected ServerSocket |
createServerSocket(URI bind)
Factory method to create a new ServerSocket |
protected TcpTransportChannel |
createTransportChannel(Socket socket,
PooledExecutor executor)
|
int |
getBacklog()
|
int |
getMaxOutstandingMessages()
|
InetSocketAddress |
getSocketAddress()
An optional method to return the socket address if there is one on which this channel is listening. |
WireFormat |
getWireFormat()
|
boolean |
isUseAsyncSend()
|
void |
run()
pull Sockets from the ServerSocket |
void |
setBacklog(int backlog)
|
void |
setMaxOutstandingMessages(int maxOutstandingMessages)
|
void |
setUseAsyncSend(boolean useAsyncSend)
|
void |
setWireFormat(WireFormat wireFormat)
|
void |
start()
Called to start the service |
void |
stop()
Called to shutdown the service |
String |
toString()
|
protected void |
updatePhysicalUri(URI bindAddr)
In cases where we construct ourselves with a zero port we need to regenerate the URI with the real physical port so that people can connect to us via discovery |
Methods inherited from class org.activemq.transport.TransportServerChannelSupport |
---|
addClient, getTransportChannelListener, getUrl, removeClient, resolveHostName, setTransportChannelListener, setUrl |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final int DEFAULT_BACKLOG
Constructor Detail |
---|
public TcpTransportServerChannel(WireFormat wireFormat, URI bindAddr) throws JMSException
bindAddr
-
JMSException
public TcpTransportServerChannel(WireFormat wireFormat, ServerSocket serverSocket) throws JMSException
JMSException
Method Detail |
---|
public void start() throws JMSException
Service
start
in interface Service
start
in interface TransportServerChannel
start
in class TransportServerChannelSupport
JMSException
- if an error occurspublic void stop() throws JMSException
Service
stop
in interface Service
stop
in interface TransportServerChannel
stop
in class TransportServerChannelSupport
JMSException
public InetSocketAddress getSocketAddress()
TransportServerChannel
getSocketAddress
in interface TransportServerChannel
getSocketAddress
in class TransportServerChannelSupport
public String toString()
toString
in class Object
public void run()
run
in interface Runnable
protected TcpTransportChannel createTransportChannel(Socket socket, PooledExecutor executor) throws JMSException
JMSException
public boolean isUseAsyncSend()
public void setUseAsyncSend(boolean useAsyncSend)
public int getMaxOutstandingMessages()
public void setMaxOutstandingMessages(int maxOutstandingMessages)
public int getBacklog()
public void setBacklog(int backlog)
public WireFormat getWireFormat()
public void setWireFormat(WireFormat wireFormat)
protected void updatePhysicalUri(URI bindAddr) throws URISyntaxException
URISyntaxException
protected ServerSocket createServerSocket(URI bind) throws UnknownHostException, IOException
UnknownHostException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |