org.apache.geronimo.activemq
Class TransportConnectorGBeanImpl

java.lang.Object
  extended by org.apache.geronimo.activemq.TransportConnectorGBeanImpl
All Implemented Interfaces:
ActiveMQConnector, GBeanLifecycle, JMSConnector, NetworkConnector

public class TransportConnectorGBeanImpl
extends Object
implements GBeanLifecycle, ActiveMQConnector

Default implementation of the ActiveMQ connector


Field Summary
static GBeanInfo GBEAN_INFO
           
 
Fields inherited from interface org.apache.geronimo.activemq.ActiveMQConnector
CONNECTOR_J2EE_TYPE
 
Constructor Summary
TransportConnectorGBeanImpl(BrokerServiceGBean brokerServiceGBean, String protocol, String host, int port)
           
 
Method Summary
protected  org.apache.activemq.broker.TransportConnector createBrokerConnector(String url)
           
 void doFail()
          Fails the GBean.
 void doStart()
          Starts the GBean.
 void doStop()
          Stops the target.
 ClassLoader getClassLoader()
           
static GBeanInfo getGBeanInfo()
           
 String getHost()
          Gets the hostname/IP that this connector listens on.
 InetSocketAddress getListenAddress()
          Every connector must specify a property of type InetSocketAddress because we use that to identify the network services to print a list during startup.
 String getPath()
           
 int getPort()
          Gets the network port that this connector listens on.
 String getProtocol()
          Gets the network protocol that this connector handles.
 String getQuery()
           
 String getUrl()
           
 void setClassLoader(ClassLoader classLoader)
           
 void setHost(String host)
          Sets the hostname/IP that this connector listens on.
 void setPath(String path)
           
 void setPort(int port)
          Sets the network port that this connector listens on.
 void setProtocol(String protocol)
           
 void setQuery(String query)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GBEAN_INFO

public static final GBeanInfo GBEAN_INFO
Constructor Detail

TransportConnectorGBeanImpl

public TransportConnectorGBeanImpl(BrokerServiceGBean brokerServiceGBean,
                                   String protocol,
                                   String host,
                                   int port)
Method Detail

getProtocol

public String getProtocol()
Description copied from interface: NetworkConnector
Gets the network protocol that this connector handles.

Specified by:
getProtocol in interface NetworkConnector

setProtocol

public void setProtocol(String protocol)

getHost

public String getHost()
Description copied from interface: NetworkConnector
Gets the hostname/IP that this connector listens on.

Specified by:
getHost in interface NetworkConnector

setHost

public void setHost(String host)
Description copied from interface: NetworkConnector
Sets the hostname/IP that this connector listens on. This is typically most useful for machines with multiple network cards, but can be used to limit a connector to only listen for connections from the local machine (127.0.0.1). To listen on all available network interfaces, specify an address of 0.0.0.0.

Specified by:
setHost in interface NetworkConnector

getPort

public int getPort()
Description copied from interface: NetworkConnector
Gets the network port that this connector listens on.

Specified by:
getPort in interface NetworkConnector

setPort

public void setPort(int port)
Description copied from interface: NetworkConnector
Sets the network port that this connector listens on.

Specified by:
setPort in interface NetworkConnector

getPath

public String getPath()
Specified by:
getPath in interface ActiveMQConnector

setPath

public void setPath(String path)
Specified by:
setPath in interface ActiveMQConnector

getQuery

public String getQuery()
Specified by:
getQuery in interface ActiveMQConnector

setQuery

public void setQuery(String query)
Specified by:
setQuery in interface ActiveMQConnector

getUrl

public String getUrl()

getListenAddress

public InetSocketAddress getListenAddress()
Description copied from interface: NetworkConnector
Every connector must specify a property of type InetSocketAddress because we use that to identify the network services to print a list during startup. However, this can be read-only since the host and port are set separately using setHost and setPort.

Specified by:
getListenAddress in interface NetworkConnector

doStart

public void doStart()
             throws Exception
Description copied from interface: GBeanLifecycle
Starts the GBean. This informs the GBean that it is about to transition to the running state.

Specified by:
doStart in interface GBeanLifecycle
Throws:
Exception - if the target failed to start; this will cause a transition to the failed state

doStop

public void doStop()
            throws Exception
Description copied from interface: GBeanLifecycle
Stops the target. This informs the GBean that it is about to transition to the stopped state.

Specified by:
doStop in interface GBeanLifecycle
Throws:
Exception - if the target failed to stop; this will cause a transition to the failed state

doFail

public void doFail()
Description copied from interface: GBeanLifecycle
Fails the GBean. This informs the GBean that it is about to transition to the failed state.

Specified by:
doFail in interface GBeanLifecycle

createBrokerConnector

protected org.apache.activemq.broker.TransportConnector createBrokerConnector(String url)
                                                                       throws Exception
Throws:
Exception

getClassLoader

public ClassLoader getClassLoader()

setClassLoader

public void setClassLoader(ClassLoader classLoader)

getGBeanInfo

public static GBeanInfo getGBeanInfo()


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.