org.apache.activemq.broker
Class TransportConnector
java.lang.Object
org.apache.activemq.broker.TransportConnector
- All Implemented Interfaces:
- Connector, Service
- Direct Known Subclasses:
- ManagedTransportConnector
public class TransportConnector
- extends java.lang.Object
- implements Connector
- Version:
- $Revision: 1.6 $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
connections
protected edu.emory.mathcs.backport.java.util.concurrent.CopyOnWriteArrayList connections
statusDector
protected TransportStatusDetector statusDector
TransportConnector
public TransportConnector()
TransportConnector
public TransportConnector(Broker broker,
TransportServer server)
getConnections
public edu.emory.mathcs.backport.java.util.concurrent.CopyOnWriteArrayList getConnections()
- Returns:
- Returns the connections.
asManagedConnector
public ManagedTransportConnector asManagedConnector(javax.management.MBeanServer mbeanServer,
javax.management.ObjectName connectorName)
throws java.io.IOException,
java.net.URISyntaxException
- Factory method to create a JMX managed version of this transport connector
- Throws:
java.io.IOException
java.net.URISyntaxException
getBrokerInfo
public BrokerInfo getBrokerInfo()
- Specified by:
getBrokerInfo
in interface Connector
- Returns:
setBrokerInfo
public void setBrokerInfo(BrokerInfo brokerInfo)
getServer
public TransportServer getServer()
throws java.io.IOException,
java.net.URISyntaxException
- Throws:
java.io.IOException
java.net.URISyntaxException
getBroker
public Broker getBroker()
setBroker
public void setBroker(Broker broker)
setBrokerName
public void setBrokerName(java.lang.String brokerName)
setServer
public void setServer(TransportServer server)
getUri
public java.net.URI getUri()
setUri
public void setUri(java.net.URI uri)
- Sets the server transport URI to use if there is not a
TransportServer
configured via the
setServer(TransportServer)
method. This value is used to lazy
create a TransportServer
instance
- Parameters:
uri
-
getTaskRunnerFactory
public TaskRunnerFactory getTaskRunnerFactory()
setTaskRunnerFactory
public void setTaskRunnerFactory(TaskRunnerFactory taskRunnerFactory)
getStatistics
public ConnectorStatistics getStatistics()
- Specified by:
getStatistics
in interface Connector
- Returns:
- the statistics for this connector
getMessageAuthorizationPolicy
public MessageAuthorizationPolicy getMessageAuthorizationPolicy()
setMessageAuthorizationPolicy
public void setMessageAuthorizationPolicy(MessageAuthorizationPolicy messageAuthorizationPolicy)
- Sets the policy used to decide if the current connection is authorized to consume
a given message
start
public void start()
throws java.lang.Exception
- Specified by:
start
in interface Service
- Throws:
java.lang.Exception
stop
public void stop()
throws java.lang.Exception
- Specified by:
stop
in interface Service
- Throws:
java.lang.Exception
createConnection
protected Connection createConnection(Transport transport)
throws java.io.IOException
- Throws:
java.io.IOException
createTransportServer
protected TransportServer createTransportServer()
throws java.io.IOException,
java.net.URISyntaxException
- Throws:
java.io.IOException
java.net.URISyntaxException
getDiscoveryAgent
public DiscoveryAgent getDiscoveryAgent()
throws java.io.IOException
- Throws:
java.io.IOException
createDiscoveryAgent
protected DiscoveryAgent createDiscoveryAgent()
throws java.io.IOException
- Throws:
java.io.IOException
setDiscoveryAgent
public void setDiscoveryAgent(DiscoveryAgent discoveryAgent)
getDiscoveryUri
public java.net.URI getDiscoveryUri()
setDiscoveryUri
public void setDiscoveryUri(java.net.URI discoveryUri)
getConnectUri
public java.net.URI getConnectUri()
throws java.io.IOException,
java.net.URISyntaxException
- Throws:
java.io.IOException
java.net.URISyntaxException
setConnectUri
public void setConnectUri(java.net.URI transportUri)
onStarted
public void onStarted(TransportConnection connection)
onStopped
public void onStopped(TransportConnection connection)
getName
public java.lang.String getName()
setName
public void setName(java.lang.String name)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
isDisableAsyncDispatch
public boolean isDisableAsyncDispatch()
setDisableAsyncDispatch
public void setDisableAsyncDispatch(boolean disableAsyncDispatch)
isEnableStatusMonitor
public boolean isEnableStatusMonitor()
- Returns:
- the enableStatusMonitor
setEnableStatusMonitor
public void setEnableStatusMonitor(boolean enableStatusMonitor)
- Parameters:
enableStatusMonitor
- the enableStatusMonitor to set
Copyright © 2010 Apache Software Foundation. All Rights Reserved.