org.apache.activemq.transport.tcp
Class TcpTransportServer
java.lang.Object
org.apache.activemq.util.ServiceSupport
org.apache.activemq.transport.TransportServerSupport
org.apache.activemq.transport.TransportServerThreadSupport
org.apache.activemq.transport.tcp.TcpTransportServer
- All Implemented Interfaces:
- java.lang.Runnable, Service, TransportServer
- Direct Known Subclasses:
- SslTransportServer, XmppTransportServer
public class TcpTransportServer
- extends TransportServerThreadSupport
A TCP based implementation of TransportServer
- Version:
- $Revision: 1.1 $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
serverSocket
protected java.net.ServerSocket serverSocket
backlog
protected int backlog
wireFormatFactory
protected WireFormatFactory wireFormatFactory
transportFactory
protected final TcpTransportFactory transportFactory
maxInactivityDuration
protected long maxInactivityDuration
minmumWireFormatVersion
protected int minmumWireFormatVersion
trace
protected boolean trace
transportOptions
protected java.util.Map transportOptions
serverSocketFactory
protected final javax.net.ServerSocketFactory serverSocketFactory
TcpTransportServer
public TcpTransportServer(TcpTransportFactory transportFactory,
java.net.URI location,
javax.net.ServerSocketFactory serverSocketFactory)
throws java.io.IOException,
java.net.URISyntaxException
- Throws:
java.io.IOException
java.net.URISyntaxException
bind
public void bind()
throws java.io.IOException
- Throws:
java.io.IOException
getWireFormatFactory
public WireFormatFactory getWireFormatFactory()
- Returns:
- Returns the wireFormatFactory.
setWireFormatFactory
public void setWireFormatFactory(WireFormatFactory wireFormatFactory)
- Parameters:
wireFormatFactory
- The wireFormatFactory to set.
setBrokerInfo
public void setBrokerInfo(BrokerInfo brokerInfo)
- Associates a broker info with the transport server so that the transport
can do discovery advertisements of the broker.
- Parameters:
brokerInfo
-
getMaxInactivityDuration
public long getMaxInactivityDuration()
setMaxInactivityDuration
public void setMaxInactivityDuration(long maxInactivityDuration)
getMinmumWireFormatVersion
public int getMinmumWireFormatVersion()
setMinmumWireFormatVersion
public void setMinmumWireFormatVersion(int minmumWireFormatVersion)
isTrace
public boolean isTrace()
setTrace
public void setTrace(boolean trace)
run
public void run()
- pull Sockets from the ServerSocket
createTransport
protected Transport createTransport(java.net.Socket socket,
WireFormat format)
throws java.io.IOException
- Allow derived classes to override the Transport implementation that this transport server creates.
- Parameters:
socket
- format
-
- Returns:
-
- Throws:
java.io.IOException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
- Returns:
- pretty print of this
resolveHostName
protected java.lang.String resolveHostName(java.lang.String hostName)
throws java.net.UnknownHostException
- Parameters:
hostName
-
- Returns:
- real hostName
- Throws:
java.net.UnknownHostException
doStop
protected void doStop(ServiceStopper stopper)
throws java.lang.Exception
- Overrides:
doStop
in class TransportServerThreadSupport
- Throws:
java.lang.Exception
getSocketAddress
public java.net.InetSocketAddress getSocketAddress()
- Returns:
- The socket address that this transport is accepting connections on or null if
this does not or is not currently accepting connections on a socket.
setTransportOption
public void setTransportOption(java.util.Map transportOptions)
Copyright © 2009 Apache Software Foundation. All Rights Reserved.