Class EmbeddedActiveMQ
java.lang.Object
org.apache.activemq.artemis.core.server.embedded.EmbeddedActiveMQ
- Direct Known Subclasses:
EmbeddedJMS
Helper class to simplify bootstrap of ActiveMQ Artemis server. Bootstraps from classpath-based config files.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ActiveMQServerprotected Stringprotected Configurationprotected MBeanServerprotected Stringprotected ActiveMQSecurityManager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetConfigResourcePath(String filename) Classpath resource for activemq server config.setConfiguration(Configuration configuration) Set this object if you are not using file-based configuration.setMbeanServer(MBeanServer mbeanServer) Use this mbean server to register management beans.setPropertiesResourcePath(String filename) Classpath resource for broker properties file.setSecurityManager(ActiveMQSecurityManager securityManager) Set the activemq security manager.start()stop()booleanwaitClusterForming(long timeWait, TimeUnit unit, int iterations, int servers) It will iterate the cluster connections until you have at least the number of expected servers
-
Field Details
-
securityManager
-
configResourcePath
-
configuration
-
activeMQServer
-
mbeanServer
-
propertiesResourcePath
-
-
Constructor Details
-
EmbeddedActiveMQ
public EmbeddedActiveMQ()
-
-
Method Details
-
setConfigResourcePath
Classpath resource for activemq server config. Defaults to 'broker.xml'. -
setPropertiesResourcePath
Classpath resource for broker properties file. Defaults to 'broker.properties'. -
setSecurityManager
Set the activemq security manager. This defaults to org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManagerImpl -
waitClusterForming
public boolean waitClusterForming(long timeWait, TimeUnit unit, int iterations, int servers) throws Exception It will iterate the cluster connections until you have at least the number of expected servers- Parameters:
timeWait- Time to wait on each iterationunit- unit of time to waititerations- number of iterationsservers- number of minimal servers- Throws:
Exception
-
setMbeanServer
Use this mbean server to register management beans. If not set, no mbeans will be registered. -
setConfiguration
Set this object if you are not using file-based configuration. The default implementation will load configuration from a file. -
getConfiguration
-
getActiveMQServer
-
start
- Throws:
Exception
-
createActiveMQServer
- Throws:
Exception
-
stop
- Throws:
Exception
-