Package org.apache.activemq.transport.vm
Class VMTransportServer
- java.lang.Object
-
- org.apache.activemq.transport.vm.VMTransportServer
-
- All Implemented Interfaces:
Service,TransportServer
public class VMTransportServer extends Object implements TransportServer
Broker side of the VMTransport
-
-
Constructor Summary
Constructors Constructor Description VMTransportServer(URI location, boolean disposeOnDisconnect)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Transportconfigure(Transport transport)Configure transportVMTransportconnect()URIgetBindURI()intgetConnectionCount()URIgetConnectURI()InetSocketAddressgetSocketAddress()booleanisAllowLinkStealing()Some protocols allow link stealing by default (if 2 connections have the same clientID - the youngest wins).booleanisSslServer()For TransportServers that provide SSL connections to their connected peers they should return true here if and only if they populate the ConnectionInfo command presented to the Broker with the peers certificate chain so that the broker knows it can use that information to authenticate the connected peer.voidsetAcceptListener(TransportAcceptListener acceptListener)Set the Transport accept listener for new ConnectionsvoidsetAllowLinkStealing(boolean allowLinkStealing)voidsetBrokerInfo(BrokerInfo brokerInfo)Associates a broker info with the transport server so that the transport can do discovery advertisements of the broker.voidstart()voidstop()StringtoString()
-
-
-
Constructor Detail
-
VMTransportServer
public VMTransportServer(URI location, boolean disposeOnDisconnect)
- Parameters:
location-disposeOnDisconnect-
-
-
Method Detail
-
toString
public String toString()
-
connect
public VMTransport connect() throws IOException
- Returns:
- new VMTransport
- Throws:
IOException
-
configure
public static Transport configure(Transport transport)
Configure transport- Parameters:
transport-- Returns:
- the Transport
-
setAcceptListener
public void setAcceptListener(TransportAcceptListener acceptListener)
Set the Transport accept listener for new Connections- Specified by:
setAcceptListenerin interfaceTransportServer- Parameters:
acceptListener-
-
start
public void start() throws IOException- Specified by:
startin interfaceService- Throws:
IOException
-
stop
public void stop() throws IOException- Specified by:
stopin interfaceService- Throws:
IOException
-
getConnectURI
public URI getConnectURI()
- Specified by:
getConnectURIin interfaceTransportServer
-
getBindURI
public URI getBindURI()
-
setBrokerInfo
public void setBrokerInfo(BrokerInfo brokerInfo)
Description copied from interface:TransportServerAssociates a broker info with the transport server so that the transport can do discovery advertisements of the broker.- Specified by:
setBrokerInfoin interfaceTransportServer
-
getSocketAddress
public InetSocketAddress getSocketAddress()
- Specified by:
getSocketAddressin interfaceTransportServer- 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.
-
getConnectionCount
public int getConnectionCount()
-
isSslServer
public boolean isSslServer()
Description copied from interface:TransportServerFor TransportServers that provide SSL connections to their connected peers they should return true here if and only if they populate the ConnectionInfo command presented to the Broker with the peers certificate chain so that the broker knows it can use that information to authenticate the connected peer.- Specified by:
isSslServerin interfaceTransportServer- Returns:
- true if this transport server provides SSL level security over its connections.
-
isAllowLinkStealing
public boolean isAllowLinkStealing()
Description copied from interface:TransportServerSome protocols allow link stealing by default (if 2 connections have the same clientID - the youngest wins). This is the default for AMQP and MQTT. However, JMS 1.1 spec requires the opposite- Specified by:
isAllowLinkStealingin interfaceTransportServer- Returns:
- true if allow link stealing is enabled.
-
setAllowLinkStealing
public void setAllowLinkStealing(boolean allowLinkStealing)
-
-