org.apache.activemq.xbean
Class XBeanBrokerService

java.lang.Object
  extended by org.apache.activemq.broker.BrokerService
      extended by org.apache.activemq.xbean.XBeanBrokerService
All Implemented Interfaces:
Service, org.springframework.context.ApplicationContextAware

public class XBeanBrokerService
extends BrokerService
implements org.springframework.context.ApplicationContextAware

An ActiveMQ Message Broker. It consists of a number of transport connectors, network connectors and a bunch of properties which can be used to configure the broker as its lazily created.

Version:
$Revision: 1.1 $

Field Summary
 
Fields inherited from class org.apache.activemq.broker.BrokerService
DEFAULT_BROKER_NAME, DEFAULT_PORT, destinationFactory, LOCAL_HOST_NAME, slaveStartSignal
 
Constructor Summary
XBeanBrokerService()
           
 
Method Summary
 void afterPropertiesSet()
           
 void destroy()
           
 org.springframework.context.ApplicationContext getApplicationContext()
           
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 void setDestroyApplicationContextOnShutdown(boolean destroy)
          Sets whether the broker should shutdown the ApplicationContext when the broker jvm is shutdown.
 void setDestroyApplicationContextOnStop(boolean destroy)
          Sets whether the broker should shutdown the ApplicationContext when the broker is stopped.
 void setStart(boolean start)
          Sets whether or not the broker is started along with the ApplicationContext it is defined within.
 void stop()
           
 
Methods inherited from class org.apache.activemq.broker.BrokerService
addConnector, addConnector, addConnector, addConnector, addInterceptors, addJmsConnector, addNetworkConnector, addNetworkConnector, addNetworkConnector, addProxyConnector, addProxyConnector, addProxyConnector, addService, addShutdownHook, addShutdownHook, checkQueueSize, configureService, configureServices, containerShutdown, createAdminConnectionContext, createBroker, createBrokerObjectName, createDefaultDestinationInterceptor, createNetworkConnectorObjectName, createPersistenceAdapter, createPersistenceFactory, createRegionBroker, createRegionBroker, createTransportConnector, deleteAllMessages, getAdminConnectionContext, getAdminView, getBroker, getBrokerDataDirectory, getBrokerName, getBrokerObjectName, getConnectorByName, getConsumerSystemUsage, getConsumerSystemUsagePortion, getDataDirectoryFile, getDestination, getDestinationInterceptors, getDestinationPolicy, getDestinations, getJmsBridgeConnectors, getManagementContext, getMasterConnectorURI, getMessageAuthorizationPolicy, getNetworkConnectorByName, getNetworkConnectors, getNetworkConnectorURIs, getPersistenceAdapter, getPersistenceFactory, getPersistenceTaskRunnerFactory, getPersistenceThreadPriority, getPlugins, getPort, getProducerSystemUsage, getProducerSystemUsagePortion, getProxyConnectors, getRegionBroker, getServices, getSlaveStartSignal, getSslContext, getSystemExitOnShutdownExitCode, getSystemUsage, getTaskRunnerFactory, getTaskRunnerPriority, getTempDataStore, getTimeBeforePurgeTempDestinations, getTmpDataDirectory, getTransportConnectors, getTransportConnectorURIs, getTransportConnectorURIsAsMap, getVmConnectorURI, getWaitForSlaveTimeout, handleIOException, isAdvisorySupport, isCacheTempDestinations, isDedicatedTaskRunner, isDeleteAllMessagesOnStartup, isEnableStatistics, isKeepDurableSubsActive, isMonitorConnectionSplits, isPassiveSlave, isPersistent, isPopulateJMSXUserID, isShutdownOnMasterFailure, isShutdownOnSlaveFailure, isSlave, isSplitSystemUsageForProducersConsumers, isStarted, isSupportFailOver, isSystemExitOnShutdown, isUseJmx, isUseLocalHostBrokerName, isUseLoggingForShutdownErrors, isUseMirroredQueues, isUseShutdownHook, isUseTempMirroredQueues, isUseVirtualTopics, isWaitForSlave, logError, masterFailed, processHelperProperties, registerConnectorMBean, registerFTConnectorMBean, registerJmsConnectorMBean, registerNetworkConnectorMBean, registerPersistenceAdapterMBean, registerProxyConnectorMBean, removeConnector, removeDestination, removeJmsConnector, removeNetworkConnector, removeService, removeShutdownHook, removeShutdownHook, setAdminView, setAdvisorySupport, setBrokerName, setBrokerObjectName, setCacheTempDestinations, setConsumerSystemUsage, setConsumerSystemUsagePortion, setDataDirectory, setDataDirectoryFile, setDedicatedTaskRunner, setDeleteAllMessagesOnStartup, setDestinationFactory, setDestinationInterceptors, setDestinationPolicy, setDestinations, setEnableStatistics, setIoExceptionHandler, setJmsBridgeConnectors, setKeepDurableSubsActive, setManagementContext, setMasterConnectorURI, setMessageAuthorizationPolicy, setMonitorConnectionSplits, setNetworkConnectors, setNetworkConnectorURIs, setPassiveSlave, setPersistenceAdapter, setPersistenceFactory, setPersistenceTaskRunnerFactory, setPersistenceThreadPriority, setPersistent, setPlugins, setPopulateJMSXUserID, setProducerSystemUsage, setProducerSystemUsagePortion, setProxyConnectors, setRegionBroker, setServices, setShutdownOnMasterFailure, setShutdownOnSlaveFailure, setSplitSystemUsageForProducersConsumers, setSslContext, setSupportFailOver, setSystemExitOnShutdown, setSystemExitOnShutdownExitCode, setSystemUsage, setTaskRunnerFactory, setTaskRunnerPriority, setTempDataStore, setTimeBeforePurgeTempDestinations, setTmpDataDirectory, setTransportConnectors, setTransportConnectorURIs, setUseJmx, setUseLocalHostBrokerName, setUseLoggingForShutdownErrors, setUseMirroredQueues, setUseShutdownHook, setUseTempMirroredQueues, setUseVirtualTopics, setVmConnectorURI, setWaitForSlave, setWaitForSlaveTimeout, slaveConnectionEstablished, start, start, startAllConnectors, startDestinations, startDestinationsInPersistenceStore, startManagementContext, startTransportConnector, stopAllConnectors, stopGracefully, toString, unregisterConnectorMBean, unregisterNetworkConnectorMBean, unregisterPersistenceAdapterMBean, waitForSlave, waitUntilStarted, waitUntilStopped
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XBeanBrokerService

public XBeanBrokerService()
Method Detail

afterPropertiesSet

@PostConstruct
public void afterPropertiesSet()
                        throws Exception
Throws:
Exception

destroy

@PreDestroy
public void destroy()
             throws Exception
Throws:
Exception

stop

public void stop()
          throws Exception
Specified by:
stop in interface Service
Overrides:
stop in class BrokerService
Throws:
Exception

setStart

public void setStart(boolean start)
Sets whether or not the broker is started along with the ApplicationContext it is defined within. Normally you would want the broker to start up along with the ApplicationContext but sometimes when working with JUnit tests you may wish to start and stop the broker explicitly yourself.


setDestroyApplicationContextOnShutdown

public void setDestroyApplicationContextOnShutdown(boolean destroy)
Sets whether the broker should shutdown the ApplicationContext when the broker jvm is shutdown. The broker can be stopped because the underlying JDBC store is unavailable for example.


setDestroyApplicationContextOnStop

public void setDestroyApplicationContextOnStop(boolean destroy)
Sets whether the broker should shutdown the ApplicationContext when the broker is stopped. The broker can be stopped because the underlying JDBC store is unavailable for example.


setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                           throws org.springframework.beans.BeansException
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException

getApplicationContext

public org.springframework.context.ApplicationContext getApplicationContext()


Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.