org.apache.geronimo.activemq
Class BrokerServiceGBeanImpl

java.lang.Object
  extended by org.apache.geronimo.activemq.BrokerServiceGBeanImpl
All Implemented Interfaces:
ActiveMQBroker, BrokerServiceGBean, GBeanLifecycle, JMSBroker, NetworkContainer, J2EEManagedObject

public class BrokerServiceGBeanImpl
extends Object
implements GBeanLifecycle, BrokerServiceGBean

Default implementation of the ActiveMQ Message Server


Field Summary
static GBeanInfo GBEAN_INFO
           
 
Constructor Summary
BrokerServiceGBeanImpl()
           
 
Method Summary
 void doFail()
          Fails the GBean.
 void doStart()
          Starts the GBean.
 void doStop()
          Stops the target.
 org.apache.activemq.broker.BrokerService getBrokerContainer()
           
 String getBrokerName()
           
 String getBrokerUri()
           
 ClassLoader getClassLoader()
           
 NetworkConnector[] getConnectors()
          Gets any existing connectors associated with this network container.
 NetworkConnector[] getConnectors(String protocol)
          Gets any existing connectors for this network container for the specified protocol.
 String getDataDirectory()
           
 org.apache.geronimo.connector.outbound.ConnectionFactorySource getDataSource()
           
static GBeanInfo getGBeanInfo()
           
 JMSManager getManager()
           
 String getObjectName()
          Gets the unique name of this object.
 ServerInfo getServerInfo()
           
 boolean isEventProvider()
          Determines if this object implemnts the event provider type defined in the J2EE Management specification.
 boolean isStateManageable()
          Determines if this object implements the state manageable type defined in the J2EE Management specification.
 boolean isStatisticsProvider()
          Determines if this object implemnts the statistics provider type defined in the J2EE Management specification.
 boolean isUseShutdownHook()
           
 void setBrokerName(String brokerName)
           
 void setBrokerUri(String brokerUri)
           
 void setClassLoader(ClassLoader classLoader)
           
 void setDataDirectory(String dataDir)
           
 void setDataSource(org.apache.geronimo.connector.outbound.ConnectionFactorySource dataSource)
           
 void setManager(JMSManager manager)
           
 void setMbeanServerReference(MBeanServerReference mbeanServerReference)
           
 void setObjectName(String objectName)
           
 void setServerInfo(ServerInfo serverInfo)
           
 void setUseShutdownHook(boolean useShutdownHook)
           
 
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

BrokerServiceGBeanImpl

public BrokerServiceGBeanImpl()
Method Detail

getBrokerContainer

public org.apache.activemq.broker.BrokerService getBrokerContainer()
Specified by:
getBrokerContainer in interface BrokerServiceGBean

setMbeanServerReference

public void setMbeanServerReference(MBeanServerReference mbeanServerReference)

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

getGBeanInfo

public static GBeanInfo getGBeanInfo()

getBrokerName

public String getBrokerName()
Specified by:
getBrokerName in interface BrokerServiceGBean
Returns:
Returns the brokerName.

getBrokerUri

public String getBrokerUri()

setBrokerName

public void setBrokerName(String brokerName)

setBrokerUri

public void setBrokerUri(String brokerUri)

getServerInfo

public ServerInfo getServerInfo()

setServerInfo

public void setServerInfo(ServerInfo serverInfo)

getDataDirectory

public String getDataDirectory()

setDataDirectory

public void setDataDirectory(String dataDir)

getDataSource

public org.apache.geronimo.connector.outbound.ConnectionFactorySource getDataSource()

setDataSource

public void setDataSource(org.apache.geronimo.connector.outbound.ConnectionFactorySource dataSource)

getObjectName

public String getObjectName()
Description copied from interface: J2EEManagedObject
Gets the unique name of this object. The object name must comply with the ObjectName specification in the JMX specification and the restrictions in the J2EEManagementInterface.

Specified by:
getObjectName in interface J2EEManagedObject
Returns:
the unique name of this object within the server

isStateManageable

public boolean isStateManageable()
Description copied from interface: J2EEManagedObject
Determines if this object implements the state manageable type defined in the J2EE Management specification.

Specified by:
isStateManageable in interface J2EEManagedObject
Returns:
true if this class also implements the state manageable type; false otherwise

isStatisticsProvider

public boolean isStatisticsProvider()
Description copied from interface: J2EEManagedObject
Determines if this object implemnts the statistics provider type defined in the J2EE Management specification.

Specified by:
isStatisticsProvider in interface J2EEManagedObject
Returns:
true if this class also implements the statistics provider type; false otherwise

isEventProvider

public boolean isEventProvider()
Description copied from interface: J2EEManagedObject
Determines if this object implemnts the event provider type defined in the J2EE Management specification.

Specified by:
isEventProvider in interface J2EEManagedObject
Returns:
true if this class also implements the event manageable type; false otherwise

getConnectors

public NetworkConnector[] getConnectors()
Description copied from interface: NetworkContainer
Gets any existing connectors associated with this network container.

Specified by:
getConnectors in interface NetworkContainer

getConnectors

public NetworkConnector[] getConnectors(String protocol)
Description copied from interface: NetworkContainer
Gets any existing connectors for this network container for the specified protocol.

Specified by:
getConnectors in interface NetworkContainer
Parameters:
protocol - A protocol as returned by getSupportedProtocols

getManager

public JMSManager getManager()

setManager

public void setManager(JMSManager manager)

setObjectName

public void setObjectName(String objectName)

getClassLoader

public ClassLoader getClassLoader()

setClassLoader

public void setClassLoader(ClassLoader classLoader)

isUseShutdownHook

public boolean isUseShutdownHook()

setUseShutdownHook

public void setUseShutdownHook(boolean useShutdownHook)


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