org.codehaus.activemq.transport
Class NetworkConnector

java.lang.Object
  extended byorg.codehaus.activemq.transport.NetworkConnector
All Implemented Interfaces:
Service
Direct Known Subclasses:
DiscoveryNetworkConnector, RemoteNetworkConnector

public class NetworkConnector
extends Object
implements Service

Represents a connector to one or more remote brokers. This class manages a number of NetworkChannel instances which may or may not be connected to a remote broker at any point in time.

The implementation of this class could use a fixed number of configured NetworkChannel instances or could use discovery to find them.

Version:
$Revision: 1.6 $

Field Summary
protected  PooledExecutor threadPool
           
 
Constructor Summary
NetworkConnector(BrokerContainer brokerContainer)
           
 
Method Summary
 void addNetworkChannel(NetworkChannel networkChannel)
          Adds a new network channel
 NetworkChannel addNetworkChannel(String uri)
          Adds a new network channel for the given URI
protected  NetworkChannel createNetworkChannel(String url)
          Create a channel from the url
 BrokerContainer getBrokerContainer()
           
 Map getLocalDetails()
           
 List getNetworkChannels()
           
 String getRemotePassword()
           
 String getRemoteUserName()
           
 PooledExecutor getThreadPool()
           
 void removeNetworkChannel(NetworkChannel networkChannel)
          Removes a network channel
 void setLocalDetails(Map localDetails)
           
 void setNetworkChannels(List networkChannels)
          Sets a list of NetworkChannel instances
 void setRemotePassword(String remotePassword)
           
 void setRemoteUserName(String remoteUserName)
           
 void setTransportChannelListener(TransportChannelListener listener)
           
 void start()
          Called to start the service
 void stop()
          Called to shutdown the service
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

threadPool

protected PooledExecutor threadPool
Constructor Detail

NetworkConnector

public NetworkConnector(BrokerContainer brokerContainer)
Method Detail

start

public void start()
           throws JMSException
Description copied from interface: Service
Called to start the service

Specified by:
start in interface Service
Throws:
JMSException

stop

public void stop()
          throws JMSException
Description copied from interface: Service
Called to shutdown the service

Specified by:
stop in interface Service
Throws:
JMSException

setTransportChannelListener

public void setTransportChannelListener(TransportChannelListener listener)

getBrokerContainer

public BrokerContainer getBrokerContainer()

getThreadPool

public PooledExecutor getThreadPool()
Returns:
Returns the threadPool.

getNetworkChannels

public List getNetworkChannels()

getLocalDetails

public Map getLocalDetails()

setLocalDetails

public void setLocalDetails(Map localDetails)

getRemotePassword

public String getRemotePassword()

setRemotePassword

public void setRemotePassword(String remotePassword)

getRemoteUserName

public String getRemoteUserName()

setRemoteUserName

public void setRemoteUserName(String remoteUserName)

setNetworkChannels

public void setNetworkChannels(List networkChannels)
Sets a list of NetworkChannel instances

Parameters:
networkChannels -

addNetworkChannel

public NetworkChannel addNetworkChannel(String uri)
Adds a new network channel for the given URI

Parameters:
uri -
Returns:

addNetworkChannel

public void addNetworkChannel(NetworkChannel networkChannel)
Adds a new network channel


removeNetworkChannel

public void removeNetworkChannel(NetworkChannel networkChannel)
Removes a network channel


createNetworkChannel

protected NetworkChannel createNetworkChannel(String url)
Create a channel from the url

Parameters:
url -
Returns:


Copyright © 2004-2005 Protique, Ltd.. All Rights Reserved.