Package org.apache.activemq.transport
Class TransportServerSupport
- java.lang.Object
-
- org.apache.activemq.util.ServiceSupport
-
- org.apache.activemq.transport.TransportServerSupport
-
- All Implemented Interfaces:
Service,TransportServer
- Direct Known Subclasses:
TransportServerThreadSupport,UdpTransportServer,WebTransportServerSupport
public abstract class TransportServerSupport extends ServiceSupport implements TransportServer
A useful base class for implementations ofTransportServer
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanallowLinkStealingprotected Map<String,Object>transportOptions
-
Constructor Summary
Constructors Constructor Description TransportServerSupport()TransportServerSupport(URI location)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TransportAcceptListenergetAcceptListener()URIgetBindLocation()URIgetConnectURI()booleanisAllowLinkStealing()Some protocols allow link stealing by default (if 2 connections have the same clientID - the youngest wins).protected voidonAcceptError(Exception e)voidsetAcceptListener(TransportAcceptListener acceptListener)Registers an accept listenervoidsetAllowLinkStealing(boolean allowLinkStealing)voidsetBindLocation(URI bindLocation)voidsetConnectURI(URI location)voidsetTransportOption(Map<String,Object> transportOptions)-
Methods inherited from class org.apache.activemq.util.ServiceSupport
addServiceListener, dispose, doStart, doStop, isStarted, isStopped, isStopping, postStop, preStart, removeServiceListener, start, stop
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.activemq.transport.TransportServer
getSocketAddress, isSslServer, setBrokerInfo
-
-
-
-
Constructor Detail
-
TransportServerSupport
public TransportServerSupport()
-
TransportServerSupport
public TransportServerSupport(URI location)
-
-
Method Detail
-
getAcceptListener
public TransportAcceptListener getAcceptListener()
- Returns:
- Returns the acceptListener.
-
setAcceptListener
public void setAcceptListener(TransportAcceptListener acceptListener)
Registers an accept listener- Specified by:
setAcceptListenerin interfaceTransportServer- Parameters:
acceptListener-
-
getConnectURI
public URI getConnectURI()
- Specified by:
getConnectURIin interfaceTransportServer- Returns:
- Returns the location.
-
setConnectURI
public void setConnectURI(URI location)
- Parameters:
location- The location to set.
-
onAcceptError
protected void onAcceptError(Exception e)
-
getBindLocation
public URI getBindLocation()
-
setBindLocation
public void setBindLocation(URI bindLocation)
-
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)
-
-