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
A useful base class for implementations of
TransportServer
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Some protocols allow link stealing by default (if 2 connections have the same clientID - the youngest wins).protected void
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
getMaxConnectionExceededCount, getSocketAddress, isSslServer, resetStatistics, setBrokerInfo
-
Field Details
-
transportOptions
-
allowLinkStealing
protected boolean allowLinkStealing
-
-
Constructor Details
-
TransportServerSupport
public TransportServerSupport() -
TransportServerSupport
-
-
Method Details
-
getAcceptListener
- Returns:
- Returns the acceptListener.
-
setAcceptListener
Registers an accept listener- Specified by:
setAcceptListener
in interfaceTransportServer
- Parameters:
acceptListener
-
-
getConnectURI
- Specified by:
getConnectURI
in interfaceTransportServer
- Returns:
- Returns the location.
-
setConnectURI
- Parameters:
location
- The location to set.
-
onAcceptError
-
getBindLocation
-
setBindLocation
-
setTransportOption
-
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)
-