org.apache.activemq.broker
Class TransportConnector

java.lang.Object
  extended by 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 $

Field Summary
protected  edu.emory.mathcs.backport.java.util.concurrent.CopyOnWriteArrayList connections
           
protected  TransportStatusDetector statusDector
           
 
Constructor Summary
TransportConnector()
           
TransportConnector(Broker broker, TransportServer server)
           
 
Method Summary
 ManagedTransportConnector asManagedConnector(javax.management.MBeanServer mbeanServer, javax.management.ObjectName connectorName)
          Factory method to create a JMX managed version of this transport connector
protected  Connection createConnection(Transport transport)
           
protected  DiscoveryAgent createDiscoveryAgent()
           
protected  TransportServer createTransportServer()
           
 Broker getBroker()
           
 BrokerInfo getBrokerInfo()
           
 edu.emory.mathcs.backport.java.util.concurrent.CopyOnWriteArrayList getConnections()
           
 java.net.URI getConnectUri()
           
 DiscoveryAgent getDiscoveryAgent()
           
 java.net.URI getDiscoveryUri()
           
 MessageAuthorizationPolicy getMessageAuthorizationPolicy()
           
 java.lang.String getName()
           
 TransportServer getServer()
           
 ConnectorStatistics getStatistics()
           
 TaskRunnerFactory getTaskRunnerFactory()
           
 java.net.URI getUri()
           
 boolean isDisableAsyncDispatch()
           
 boolean isEnableStatusMonitor()
           
 void onStarted(TransportConnection connection)
           
 void onStopped(TransportConnection connection)
           
 void setBroker(Broker broker)
           
 void setBrokerInfo(BrokerInfo brokerInfo)
           
 void setBrokerName(java.lang.String brokerName)
           
 void setConnectUri(java.net.URI transportUri)
           
 void setDisableAsyncDispatch(boolean disableAsyncDispatch)
           
 void setDiscoveryAgent(DiscoveryAgent discoveryAgent)
           
 void setDiscoveryUri(java.net.URI discoveryUri)
           
 void setEnableStatusMonitor(boolean enableStatusMonitor)
           
 void setMessageAuthorizationPolicy(MessageAuthorizationPolicy messageAuthorizationPolicy)
          Sets the policy used to decide if the current connection is authorized to consume a given message
 void setName(java.lang.String name)
           
 void setServer(TransportServer server)
           
 void setTaskRunnerFactory(TaskRunnerFactory taskRunnerFactory)
           
 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.
 void start()
           
 void stop()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

connections

protected edu.emory.mathcs.backport.java.util.concurrent.CopyOnWriteArrayList connections

statusDector

protected TransportStatusDetector statusDector
Constructor Detail

TransportConnector

public TransportConnector()

TransportConnector

public TransportConnector(Broker broker,
                          TransportServer server)
Method Detail

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 © 2011 Apache Software Foundation. All Rights Reserved.