Class DiscoveryTransport
- java.lang.Object
-
- org.apache.activemq.transport.TransportFilter
-
- org.apache.activemq.transport.discovery.DiscoveryTransport
-
- All Implemented Interfaces:
Service
,DiscoveryListener
,Transport
,TransportListener
public class DiscoveryTransport extends TransportFilter implements DiscoveryListener
ATransportFilter
which uses aDiscoveryAgent
to discover remote broker instances and dynamically connect to them.
-
-
Field Summary
-
Fields inherited from class org.apache.activemq.transport.TransportFilter
transportListener
-
Fields inherited from interface org.apache.activemq.transport.discovery.DiscoveryListener
DISCOVERED_OPTION_PREFIX
-
-
Constructor Summary
Constructors Constructor Description DiscoveryTransport(CompositeTransport next)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DiscoveryAgent
getDiscoveryAgent()
void
onServiceAdd(DiscoveryEvent event)
void
onServiceRemove(DiscoveryEvent event)
void
setDiscoveryAgent(DiscoveryAgent discoveryAgent)
void
setParameters(Map<String,String> parameters)
void
start()
void
stop()
void
transportInterupted()
The transport has suffered an interuption from which it hopes to recovervoid
transportResumed()
The transport has resumed after an interuption-
Methods inherited from class org.apache.activemq.transport.TransportFilter
asyncRequest, getNext, getPeerCertificates, getReceiveCounter, getRemoteAddress, getTransportListener, getWireFormat, isConnected, isDisposed, isFaultTolerant, isReconnectSupported, isUpdateURIsSupported, narrow, onCommand, oneway, onException, reconnect, request, request, setPeerCertificates, setTransportListener, toString, updateURIs
-
-
-
-
Constructor Detail
-
DiscoveryTransport
public DiscoveryTransport(CompositeTransport next)
-
-
Method Detail
-
start
public void start() throws Exception
- Specified by:
start
in interfaceService
- Overrides:
start
in classTransportFilter
- Throws:
Exception
- See Also:
Service.start()
-
stop
public void stop() throws Exception
- Specified by:
stop
in interfaceService
- Overrides:
stop
in classTransportFilter
- Throws:
Exception
- See Also:
Service.stop()
-
onServiceAdd
public void onServiceAdd(DiscoveryEvent event)
- Specified by:
onServiceAdd
in interfaceDiscoveryListener
-
onServiceRemove
public void onServiceRemove(DiscoveryEvent event)
- Specified by:
onServiceRemove
in interfaceDiscoveryListener
-
getDiscoveryAgent
public DiscoveryAgent getDiscoveryAgent()
-
setDiscoveryAgent
public void setDiscoveryAgent(DiscoveryAgent discoveryAgent)
-
transportResumed
public void transportResumed()
Description copied from interface:TransportListener
The transport has resumed after an interuption- Specified by:
transportResumed
in interfaceTransportListener
- Overrides:
transportResumed
in classTransportFilter
-
transportInterupted
public void transportInterupted()
Description copied from interface:TransportListener
The transport has suffered an interuption from which it hopes to recover- Specified by:
transportInterupted
in interfaceTransportListener
- Overrides:
transportInterupted
in classTransportFilter
-
-