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 boolean
allowLinkStealing
protected 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 TransportAcceptListener
getAcceptListener()
URI
getBindLocation()
URI
getConnectURI()
boolean
isAllowLinkStealing()
Some protocols allow link stealing by default (if 2 connections have the same clientID - the youngest wins).protected void
onAcceptError(Exception e)
void
setAcceptListener(TransportAcceptListener acceptListener)
Registers an accept listenervoid
setAllowLinkStealing(boolean allowLinkStealing)
void
setBindLocation(URI bindLocation)
void
setConnectURI(URI location)
void
setTransportOption(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:
setAcceptListener
in interfaceTransportServer
- Parameters:
acceptListener
-
-
getConnectURI
public URI getConnectURI()
- Specified by:
getConnectURI
in 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:TransportServer
Some 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:
isAllowLinkStealing
in interfaceTransportServer
- Returns:
- true if allow link stealing is enabled.
-
setAllowLinkStealing
public void setAllowLinkStealing(boolean allowLinkStealing)
-
-