Class ActiveMQServerImpl
- java.lang.Object
-
- org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl
-
- All Implemented Interfaces:
ActiveMQComponent,ActiveMQServer,ServiceComponent
public class ActiveMQServerImpl extends Object implements ActiveMQServer
The ActiveMQ Artemis server implementation
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classActiveMQServerImpl.DefaultCriticalErrorListener-
Nested classes/interfaces inherited from interface org.apache.activemq.artemis.core.server.ActiveMQServer
ActiveMQServer.SERVER_STATE
-
-
Field Summary
Fields Modifier and Type Field Description protected ExecutorFactoryexecutorFactorystatic StringGENERIC_IGNORED_FILTERDeprecated.Replaced byFilter.GENERIC_IGNORED_FILTERstatic StringINTERNAL_NAMING_PREFIXprotected IOCriticalErrorListenerioCriticalErrorListenerprotected ExecutorFactoryioExecutorFactoryThis is a thread pool for io tasks only.protected ExecutorFactorypageExecutorFactoryThis is a thread pool for page only tasks only.protected ExecutorServicepageExecutorPoolprotected ScheduledExecutorServicescheduledPool
-
Constructor Summary
Constructors Constructor Description ActiveMQServerImpl()ActiveMQServerImpl(Configuration configuration)ActiveMQServerImpl(Configuration configuration, MBeanServer mbeanServer)ActiveMQServerImpl(Configuration configuration, MBeanServer mbeanServer, ActiveMQSecurityManager securityManager)ActiveMQServerImpl(Configuration configuration, MBeanServer mbeanServer, ActiveMQSecurityManager securityManager, ActiveMQServer parentServer)ActiveMQServerImpl(Configuration configuration, MBeanServer mbeanServer, ActiveMQSecurityManager securityManager, ActiveMQServer parentServer, ServiceRegistry serviceRegistry)ActiveMQServerImpl(Configuration configuration, ActiveMQServer parentServer)ActiveMQServerImpl(Configuration configuration, ActiveMQSecurityManager securityManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddActivationParam(String key, Object val)booleanaddAddressInfo(AddressInfo addressInfo)Add theAddressInfoto the brokerbooleanaddClientConnection(String clientId, boolean unique)voidaddExternalComponent(ActiveMQComponent externalComponent, boolean start)Adding external components is allowed only if the state isn'tActiveMQServer.SERVER_STATE.STOPPEDorActiveMQServer.SERVER_STATE.STOPPING.
It atomically starts theexternalComponentwhile being added ifstart == true.
This atomicity is necessary to preventActiveMQComponent.stop()to stop the component right after adding it, but before starting it.AddressInfoaddOrUpdateAddressInfo(AddressInfo addressInfo)A convenience method to combine the functionality ofaddAddressInfoandupdateAddressInfo.voidaddProtocolManagerFactory(ProtocolManagerFactory factory)AddressQueryResultaddressQuery(SimpleString name)voidaddScaledDownNode(SimpleString scaledDownNodeId)voidautoRemoveAddressInfo(SimpleString address, SecurityAuth auth)Remove anAddressInfofrom the broker.BindingQueryResultbindingQuery(SimpleString address, boolean newFQQN)voidcallActivationFailureListeners(Exception e)Alert activation failure listeners of a failure.voidcallBrokerAddressPlugins(ActiveMQPluginRunnable<ActiveMQServerAddressPlugin> pluginRun)voidcallBrokerBindingPlugins(ActiveMQPluginRunnable<ActiveMQServerBindingPlugin> pluginRun)voidcallBrokerBridgePlugins(ActiveMQPluginRunnable<ActiveMQServerBridgePlugin> pluginRun)voidcallBrokerConnectionPlugins(ActiveMQPluginRunnable<ActiveMQServerConnectionPlugin> pluginRun)voidcallBrokerConsumerPlugins(ActiveMQPluginRunnable<ActiveMQServerConsumerPlugin> pluginRun)voidcallBrokerCriticalPlugins(ActiveMQPluginRunnable<ActiveMQServerCriticalPlugin> pluginRun)voidcallBrokerFederationPlugins(ActiveMQPluginRunnable<ActiveMQServerFederationPlugin> pluginRun)voidcallBrokerMessagePlugins(ActiveMQPluginRunnable<ActiveMQServerMessagePlugin> pluginRun)booleancallBrokerMessagePluginsCanAccept(ServerConsumer serverConsumer, MessageReference messageReference)voidcallBrokerPlugins(ActiveMQPluginRunnable pluginRun)voidcallBrokerQueuePlugins(ActiveMQPluginRunnable<ActiveMQServerQueuePlugin> pluginRun)voidcallBrokerResourcePlugins(ActiveMQPluginRunnable<ActiveMQServerResourcePlugin> pluginRun)voidcallBrokerSessionPlugins(ActiveMQPluginRunnable<ActiveMQServerSessionPlugin> pluginRun)voidcallPostQueueCreationCallbacks(SimpleString queueName)voidcallPostQueueDeletionCallbacks(SimpleString address, SimpleString queueName)voidcheckJournalDirectory()Check if journal directory exists or create it (if configured to do so)booleancheckLiveIsNotColocated(String nodeId)voidcheckQueueCreationLimit(String username)voidclearAddressCache()voidcompleteActivation(boolean replicated)ActiveMQServercreateBackupServer(Configuration configuration)ServerSessioncreateInternalSession(String name, int minLargeMessageSize, RemotingConnection connection, boolean autoCommitSends, boolean autoCommitAcks, boolean preAcknowledge, boolean xa, String defaultAddress, SessionCallback callback, boolean autoCreateQueues, OperationContext context, Map<SimpleString,RoutingType> prefixes, String securityDomain)This is to be used in places where security is bypassed, like internal sessions, broker connections, etc...protected NodeManagercreateNodeManager(File directory, boolean replicatingBackup)PagingManagercreatePagingManager()QueuecreateQueue(QueueConfiguration queueConfiguration)Overloaded version ofActiveMQServer.createQueue(QueueConfiguration, boolean)where thebooleanparameter is alwaysfalse(i.e.QueuecreateQueue(QueueConfiguration queueConfiguration, boolean ignoreIfExists)This method creates a queue based on theQueueConfigurationinput.QueuecreateQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filterString, boolean durable, boolean temporary)Deprecated.QueuecreateQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, boolean durable, boolean temporary, int maxConsumers, boolean purgeOnNoConsumers, boolean autoCreateAddress)Deprecated.QueuecreateQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, boolean durable, boolean temporary, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount, boolean autoCreateAddress)Deprecated.QueuecreateQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, boolean durable, boolean temporary, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, SimpleString groupFirstKey, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount, boolean autoCreateAddress)Deprecated.QueuecreateQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, boolean durable, boolean temporary, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, SimpleString groupFirstKey, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount, boolean autoCreateAddress, long ringSize)Deprecated.QueuecreateQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString user, SimpleString filterString, boolean durable, boolean temporary)Deprecated.QueuecreateQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean ignoreIfExists, boolean transientQueue, boolean autoCreated, int maxConsumers, boolean purgeOnNoConsumers, boolean autoCreateAddress)Deprecated.QueuecreateQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean ignoreIfExists, boolean transientQueue, boolean autoCreated, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean lastValue, boolean autoCreateAddress)Deprecated.QueuecreateQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filterString, SimpleString user, boolean durable, boolean temporary, boolean ignoreIfExists, boolean transientQueue, boolean autoCreated, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount, boolean autoCreateAddress)Deprecated.QueuecreateQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filterString, SimpleString user, boolean durable, boolean temporary, boolean ignoreIfExists, boolean transientQueue, boolean autoCreated, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, SimpleString groupFirstKey, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount, boolean autoCreateAddress)Deprecated.QueuecreateQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filterString, SimpleString user, boolean durable, boolean temporary, boolean ignoreIfExists, boolean transientQueue, boolean autoCreated, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, SimpleString groupFirstKey, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount, boolean autoCreateAddress, long ringSize)Deprecated.QueuecreateQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean autoCreated, Integer maxConsumers, Boolean purgeOnNoConsumers, boolean autoCreateAddress)Deprecated.QueuecreateQueue(SimpleString address, SimpleString queueName, SimpleString filterString, boolean durable, boolean temporary)Deprecated.QueuecreateQueue(AddressInfo addrInfo, SimpleString queueName, SimpleString filterString, SimpleString user, boolean durable, boolean temporary, boolean ignoreIfExists, boolean transientQueue, boolean autoCreated, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, SimpleString groupFirstKey, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount, boolean autoCreateAddress, boolean configurationManaged, long ringSize)Deprecated.QueuecreateQueue(AddressInfo addressInfo, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean autoCreated, Integer maxConsumers, Boolean purgeOnNoConsumers, boolean autoCreateAddress)Deprecated.QueuecreateQueue(AddressInfo addressInfo, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean autoCreated, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean lastValue, boolean autoCreateAddress)Deprecated.QueuecreateQueue(AddressInfo addressInfo, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean autoCreated, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, Boolean lastValue, SimpleString lastValueKey, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, Boolean autoDelete, Long autoDeleteDelay, Long autoDeleteMessageCount, boolean autoCreateAddress)Deprecated.QueuecreateQueue(AddressInfo addressInfo, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean autoCreated, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, SimpleString groupFirstKey, Boolean lastValue, SimpleString lastValueKey, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, Boolean autoDelete, Long autoDeleteDelay, Long autoDeleteMessageCount, boolean autoCreateAddress)Deprecated.QueuecreateQueue(AddressInfo addressInfo, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean autoCreated, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, SimpleString groupFirstKey, Boolean lastValue, SimpleString lastValueKey, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, Boolean autoDelete, Long autoDeleteDelay, Long autoDeleteMessageCount, boolean autoCreateAddress, Long ringSize)Deprecated.ServerSessioncreateSession(String name, String username, String password, int minLargeMessageSize, RemotingConnection connection, boolean autoCommitSends, boolean autoCommitAcks, boolean preAcknowledge, boolean xa, String defaultAddress, SessionCallback callback, boolean autoCreateQueues, OperationContext context, Map<SimpleString,RoutingType> prefixes, String securityDomain, String validatedUser)voidcreateSharedQueue(QueueConfiguration queueConfiguration)This method is essentially the same asActiveMQServer.createQueue(QueueConfiguration, boolean)with a few key exceptions.voidcreateSharedQueue(SimpleString address, RoutingType routingType, SimpleString name, SimpleString filterString, SimpleString user, boolean durable)Deprecated.voidcreateSharedQueue(SimpleString address, RoutingType routingType, SimpleString name, SimpleString filterString, SimpleString user, boolean durable, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean lastValue)Deprecated.voidcreateSharedQueue(SimpleString address, RoutingType routingType, SimpleString name, SimpleString filterString, SimpleString user, boolean durable, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount)Deprecated.voidcreateSharedQueue(SimpleString address, RoutingType routingType, SimpleString name, SimpleString filterString, SimpleString user, boolean durable, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, SimpleString groupFirstKey, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount)Deprecated.protected StorageManagercreateStorageManager()This method is protected as it may be used as a hook for creating a custom storage manager (on tests for instance)booleandeployBridge(BridgeConfiguration config)DivertdeployDivert(DivertConfiguration config)voiddeployFederation(FederationConfiguration config)QueuedeployQueue(String address, String resourceName, String filterString, boolean durable, boolean temporary)Deprecated.QueuedeployQueue(SimpleString address, SimpleString resourceName, SimpleString filterString, boolean durable, boolean temporary)Deprecated.Stringdescribe()voiddestroyBridge(String name)StringdestroyConnectionWithSessionMetadata(String metaKey, String parameterValue)voiddestroyDivert(SimpleString name)voiddestroyQueue(SimpleString queueName)voiddestroyQueue(SimpleString queueName, SecurityAuth session)voiddestroyQueue(SimpleString queueName, SecurityAuth session, boolean checkConsumerCount)voiddestroyQueue(SimpleString queueName, SecurityAuth session, boolean checkConsumerCount, boolean removeConsumers)voiddestroyQueue(SimpleString queueName, SecurityAuth session, boolean checkConsumerCount, boolean removeConsumers, boolean forceAutoDeleteAddress)voiddestroyQueue(SimpleString queueName, SecurityAuth session, boolean checkConsumerCount, boolean removeConsumers, boolean forceAutoDeleteAddress, boolean checkMessageCount)voidfail(boolean failoverOnServerShutdown)Set<ActivateCallback>getActivateCallbacks()ActivationgetActivation()ActiveMQServerControlImplgetActiveMQServerControl()Returns the resource to manage this ActiveMQ Artemis server.AddressInfogetAddressInfo(SimpleString address)HierarchicalRepository<AddressSettings>getAddressSettingsRepository()RunnablegetAfterActivationCreated()A Callback for testsBackupManagergetBackupManager()List<ActiveMQServerAddressPlugin>getBrokerAddressPlugins()List<ActiveMQServerBindingPlugin>getBrokerBindingPlugins()List<ActiveMQServerBridgePlugin>getBrokerBridgePlugins()protected BrokerConnectiongetBrokerConnection(String name)List<ActiveMQServerConnectionPlugin>getBrokerConnectionPlugins()Collection<BrokerConnection>getBrokerConnections()List<ActiveMQServerConsumerPlugin>getBrokerConsumerPlugins()List<ActiveMQServerCriticalPlugin>getBrokerCriticalPlugins()List<ActiveMQServerFederationPlugin>getBrokerFederationPlugins()List<ActiveMQServerMessagePlugin>getBrokerMessagePlugins()List<ActiveMQServerBasePlugin>getBrokerPlugins()List<ActiveMQServerQueuePlugin>getBrokerQueuePlugins()List<ActiveMQServerResourcePlugin>getBrokerResourcePlugins()List<ActiveMQServerSessionPlugin>getBrokerSessionPlugins()ClusterManagergetClusterManager()ConfigurationgetConfiguration()intgetConnectionCount()ConnectionRouterManagergetConnectionRouterManager()ConnectorsServicegetConnectorsService()CriticalAnalyzergetCriticalAnalyzer()doublegetDiskStoreUsage()ExecutorFactorygetExecutorFactory()List<ActiveMQComponent>getExternalComponents()FederationManagergetFederationManager()GroupingHandlergetGroupingHandler()HAPolicygetHAPolicy()StringgetIdentity()StringgetInternalNamingPrefix()ExecutorFactorygetIOExecutorFactory()ManagementServicegetManagementService()MBeanServergetMBeanServer()MetricsManagergetMetricsManager()MirrorControllergetMirrorController()FileStoreMonitorgetMonitor()NetworkHealthCheckgetNetworkHealthCheck()SimpleStringgetNodeID()NodeManagergetNodeManager()PagingManagergetPagingManager()protected PagingStoreFactorygetPagingStoreFactory()PostOfficegetPostOffice()intgetQueueCountForUser(String username)QueueFactorygetQueueFactory()ReloadManagergetReloadManager()RemotingServicegetRemotingService()ReplicationManagergetReplicationManager()ResourceManagergetResourceManager()StringgetRuntimeTempQueueNamespace(boolean temporary)ScheduledExecutorServicegetScheduledPool()ActiveMQSecurityManagergetSecurityManager()HierarchicalRepository<Set<Role>>getSecurityRepository()SecurityStoregetSecurityStore()ServiceRegistrygetServiceRegistry()ServerSessiongetSessionByID(String sessionName)Set<ServerSession>getSessions()List<ServerSession>getSessions(String connectionID)ActiveMQServer.SERVER_STATEgetState()StringgetStatus()StorageManagergetStorageManager()ExecutorServicegetThreadPool()longgetTotalConnectionCount()longgetTotalConsumerCount()longgetTotalMessageCount()longgetTotalMessagesAcknowledged()longgetTotalMessagesAdded()StringgetUptime()longgetUptimeMillis()VersiongetVersion()booleanhasBrokerAddressPlugins()booleanhasBrokerBindingPlugins()booleanhasBrokerBridgePlugins()booleanhasBrokerConnectionPlugins()booleanhasBrokerConsumerPlugins()booleanhasBrokerCriticalPlugins()booleanhasBrokerFederationPlugins()booleanhasBrokerMessagePlugins()booleanhasBrokerPlugins()booleanhasBrokerQueuePlugins()booleanhasBrokerResourcePlugins()booleanhasBrokerSessionPlugins()booleanhasScaledDown(SimpleString scaledDownNodeId)protected voidinitializeCriticalAnalyzer()voidinjectMonitor(FileStoreMonitor storeMonitor)This method exists for a possibility of test cases replacing the FileStoreMonitor for an extension that would for instance pretend a disk full on certain tests.voidinstallMirrorController(MirrorController mirrorController)protected ServerSessionImplinternalCreateSession(String name, String username, String password, String validatedUser, int minLargeMessageSize, RemotingConnection connection, boolean autoCommitSends, boolean autoCommitAcks, boolean preAcknowledge, boolean xa, String defaultAddress, SessionCallback callback, OperationContext context, boolean autoCreateQueues, Map<SimpleString,RoutingType> prefixes, String securityDomain)voidinterruptActivationThread(NodeManager nodeManagerInUse)booleanisActive()booleanisAddressBound(String address)return true if there is a binding for this address (i.e.booleanisReplicaSync()Returns whether the initial replication synchronization process with the backup server is complete; applicable for either the live or backup server.booleanisStarted()QueuelocateQueue(SimpleString queueName)voidlockActivation()it will hold a lock for the activation.ServerSessionlookupSession(String key, String value)OperationContextnewOperationContext()QueueQueryResultqueueQuery(SimpleString name)voidregisterActivateCallback(ActivateCallback callback)voidregisterActivationFailureListener(ActivationFailureListener listener)Register a listener to detect problems during activationvoidregisterBrokerConnection(BrokerConnection brokerConnection)voidregisterBrokerPlugin(ActiveMQServerBasePlugin plugin)voidregisterBrokerPlugins(List<ActiveMQServerBasePlugin> plugins)voidregisterPostQueueCreationCallback(PostQueueCreationCallback callback)voidregisterPostQueueDeletionCallback(PostQueueDeletionCallback callback)voidreloadConfigurationFile()voidreloadNetworkHealthCheck()voidremoveAddressInfo(SimpleString address, SecurityAuth auth)Remove anAddressInfofrom the broker.voidremoveAddressInfo(SimpleString address, SecurityAuth auth, boolean force)Remove anAddressInfofrom the broker.voidremoveClientConnection(String clientId)voidremoveMirrorControl()voidremoveProtocolManagerFactory(ProtocolManagerFactory factory)voidremoveSession(String name)voidreplaceQueueFactory(QueueFactory factory)For tests only, don't use this method as it's not part of the APIvoidreplay(Date start, Date end, String address, String target, String filter)voidresetNodeManager()voidscanAddresses(MirrorController mirrorController)This method will scan all queues and addresses.voidsetActivation(Activation activation)ActiveMQServerImplsetAfterActivationCreated(Runnable afterActivationCreated)A Callback for testsvoidsetGroupingHandler(GroupingHandler groupingHandler)voidsetHAPolicy(HAPolicy haPolicy)voidsetIdentity(String identity)Sets the server identity.voidsetMBeanServer(MBeanServer mbeanServer)voidsetProperties(String fileUrltoBrokerProperties)voidsetSecurityManager(ActiveMQSecurityManager securityManager)voidsetState(ActiveMQServer.SERVER_STATE state)voidstart()voidstartBrokerConnection(String name)voidstop()voidstop(boolean isShutdown)voidstop(boolean failoverOnServerShutdown, boolean isExit)voidstop(boolean failoverOnServerShutdown, boolean criticalIOError, boolean restarting)voidstopBrokerConnection(String name)voidstopTheServer(boolean criticalIOError)Stops the server in a different thread.voidthreadDump()StringtoString()voidundeployFederation(String name)voidunlockActivation()it will release hold a lock for the activation.voidunregisterActivateCallback(ActivateCallback callback)voidunregisterActivationFailureListener(ActivationFailureListener listener)Remove a previously registered failure listenervoidunRegisterBrokerPlugin(ActiveMQServerBasePlugin plugin)voidunregisterPostQueueCreationCallback(PostQueueCreationCallback callback)voidunregisterPostQueueDeletionCallback(PostQueueDeletionCallback callback)booleanupdateAddressInfo(SimpleString address, Collection<RoutingType> routingTypes)booleanupdateAddressInfo(SimpleString address, EnumSet<RoutingType> routingTypes)Updates anAddressInfoon the broker with the specified routing types.DivertupdateDivert(DivertConfiguration config)QueueupdateQueue(String name, RoutingType routingType, Integer maxConsumers, Boolean purgeOnNoConsumers)Deprecated.QueueupdateQueue(String name, RoutingType routingType, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive)Deprecated.QueueupdateQueue(String name, RoutingType routingType, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, String user)Deprecated.QueueupdateQueue(String name, RoutingType routingType, String filterString, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, String user)Deprecated.QueueupdateQueue(String name, RoutingType routingType, String filterString, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, String groupFirstKey, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, String user)Deprecated.QueueupdateQueue(String name, RoutingType routingType, String filterString, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, String groupFirstKey, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, String user, Long ringSize)Deprecated.QueueupdateQueue(QueueConfiguration queueConfiguration)Update the queue named in theQueueConfigurationwith the corresponding properties.QueueupdateQueue(QueueConfiguration queueConfiguration, boolean forceUpdate)voidupdateStatus(String component, String statusJson)StringvalidateUser(String username, String password, RemotingConnection connection, String securityDomain)booleanwaitForActivation(long timeout, TimeUnit unit)Wait for server initialization.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.activemq.artemis.core.server.ActiveMQComponent
asyncStop
-
Methods inherited from interface org.apache.activemq.artemis.core.server.ActiveMQServer
bindingQuery, locateQueue
-
-
-
-
Field Detail
-
INTERNAL_NAMING_PREFIX
public static final String INTERNAL_NAMING_PREFIX
- See Also:
- Constant Field Values
-
GENERIC_IGNORED_FILTER
@Deprecated public static final String GENERIC_IGNORED_FILTER
Deprecated.Replaced byFilter.GENERIC_IGNORED_FILTERJMS Topics (which are outside of the scope of the core API) will require a dumb subscription with a dummy-filter at this current version as a way to keep its existence valid and TCK tests. That subscription needs an invalid filter, however paging needs to ignore any subscription with this filter. For that reason, this filter needs to be rejected on paging or any other component on the system, and just be ignored for any purpose It's declared here as this filter is considered a global ignore- See Also:
- Constant Field Values
-
scheduledPool
protected volatile ScheduledExecutorService scheduledPool
-
executorFactory
protected volatile ExecutorFactory executorFactory
-
ioExecutorFactory
protected volatile ExecutorFactory ioExecutorFactory
This is a thread pool for io tasks only. We can't use the same global executor to avoid starvations.
-
pageExecutorFactory
protected volatile ExecutorFactory pageExecutorFactory
This is a thread pool for page only tasks only. This is because we have to limit parallel reads on paging.
-
pageExecutorPool
protected volatile ExecutorService pageExecutorPool
-
ioCriticalErrorListener
protected final IOCriticalErrorListener ioCriticalErrorListener
-
-
Constructor Detail
-
ActiveMQServerImpl
public ActiveMQServerImpl()
-
ActiveMQServerImpl
public ActiveMQServerImpl(Configuration configuration)
-
ActiveMQServerImpl
public ActiveMQServerImpl(Configuration configuration, ActiveMQServer parentServer)
-
ActiveMQServerImpl
public ActiveMQServerImpl(Configuration configuration, MBeanServer mbeanServer)
-
ActiveMQServerImpl
public ActiveMQServerImpl(Configuration configuration, ActiveMQSecurityManager securityManager)
-
ActiveMQServerImpl
public ActiveMQServerImpl(Configuration configuration, MBeanServer mbeanServer, ActiveMQSecurityManager securityManager)
-
ActiveMQServerImpl
public ActiveMQServerImpl(Configuration configuration, MBeanServer mbeanServer, ActiveMQSecurityManager securityManager, ActiveMQServer parentServer)
-
ActiveMQServerImpl
public ActiveMQServerImpl(Configuration configuration, MBeanServer mbeanServer, ActiveMQSecurityManager securityManager, ActiveMQServer parentServer, ServiceRegistry serviceRegistry)
-
-
Method Detail
-
getReloadManager
public ReloadManager getReloadManager()
- Specified by:
getReloadManagerin interfaceActiveMQServer
-
getNetworkHealthCheck
public NetworkHealthCheck getNetworkHealthCheck()
- Specified by:
getNetworkHealthCheckin interfaceActiveMQServer
-
replay
public void replay(Date start, Date end, String address, String target, String filter) throws Exception
- Specified by:
replayin interfaceActiveMQServer- Throws:
Exception
-
getAfterActivationCreated
public Runnable getAfterActivationCreated()
A Callback for tests- Returns:
-
setAfterActivationCreated
public ActiveMQServerImpl setAfterActivationCreated(Runnable afterActivationCreated)
A Callback for tests- Parameters:
afterActivationCreated-- Returns:
-
createNodeManager
protected NodeManager createNodeManager(File directory, boolean replicatingBackup)
-
newOperationContext
public OperationContext newOperationContext()
- Specified by:
newOperationContextin interfaceActiveMQServer
-
start
public final void start() throws Exception- Specified by:
startin interfaceActiveMQComponent- Throws:
Exception
-
reloadNetworkHealthCheck
public void reloadNetworkHealthCheck()
-
getCriticalAnalyzer
public CriticalAnalyzer getCriticalAnalyzer()
- Specified by:
getCriticalAnalyzerin interfaceActiveMQServer
-
setProperties
public void setProperties(String fileUrltoBrokerProperties)
- Specified by:
setPropertiesin interfaceActiveMQServer
-
getStatus
public String getStatus()
- Specified by:
getStatusin interfaceActiveMQServer
-
updateStatus
public void updateStatus(String component, String statusJson)
- Specified by:
updateStatusin interfaceActiveMQServer
-
initializeCriticalAnalyzer
protected void initializeCriticalAnalyzer() throws Exception- Throws:
Exception
-
unlockActivation
public void unlockActivation()
Description copied from interface:ActiveMQServerit will release hold a lock for the activation.- Specified by:
unlockActivationin interfaceActiveMQServer
-
lockActivation
public void lockActivation()
Description copied from interface:ActiveMQServerit will hold a lock for the activation. This will prevent the activation from happening.- Specified by:
lockActivationin interfaceActiveMQServer
-
setState
public void setState(ActiveMQServer.SERVER_STATE state)
- Specified by:
setStatein interfaceActiveMQServer
-
getState
public ActiveMQServer.SERVER_STATE getState()
- Specified by:
getStatein interfaceActiveMQServer
-
interruptActivationThread
public void interruptActivationThread(NodeManager nodeManagerInUse) throws InterruptedException
- Throws:
InterruptedException
-
getActivation
public Activation getActivation()
- Specified by:
getActivationin interfaceActiveMQServer
-
getHAPolicy
public HAPolicy getHAPolicy()
- Specified by:
getHAPolicyin interfaceActiveMQServer
-
setHAPolicy
public void setHAPolicy(HAPolicy haPolicy)
- Specified by:
setHAPolicyin interfaceActiveMQServer
-
setMBeanServer
public void setMBeanServer(MBeanServer mbeanServer)
- Specified by:
setMBeanServerin interfaceActiveMQServer
-
getMBeanServer
public MBeanServer getMBeanServer()
- Specified by:
getMBeanServerin interfaceActiveMQServer
-
setSecurityManager
public void setSecurityManager(ActiveMQSecurityManager securityManager)
- Specified by:
setSecurityManagerin interfaceActiveMQServer
-
addExternalComponent
public void addExternalComponent(ActiveMQComponent externalComponent, boolean start) throws Exception
Description copied from interface:ActiveMQServerAdding external components is allowed only if the state isn'tActiveMQServer.SERVER_STATE.STOPPEDorActiveMQServer.SERVER_STATE.STOPPING.
It atomically starts theexternalComponentwhile being added ifstart == true.
This atomicity is necessary to preventActiveMQComponent.stop()to stop the component right after adding it, but before starting it.- Specified by:
addExternalComponentin interfaceActiveMQServer- Throws:
IllegalStateException- if the state isActiveMQServer.SERVER_STATE.STOPPEDorActiveMQServer.SERVER_STATE.STOPPINGException
-
getThreadPool
public ExecutorService getThreadPool()
- Specified by:
getThreadPoolin interfaceActiveMQServer
-
setActivation
public void setActivation(Activation activation)
-
stopTheServer
public final void stopTheServer(boolean criticalIOError)
Stops the server in a different thread.
-
stop
public void stop() throws Exception- Specified by:
stopin interfaceActiveMQComponent- Throws:
Exception
-
stop
public void stop(boolean isShutdown) throws Exception- Specified by:
stopin interfaceServiceComponent- Throws:
Exception
-
addActivationParam
public void addActivationParam(String key, Object val)
- Specified by:
addActivationParamin interfaceActiveMQServer
-
isAddressBound
public boolean isAddressBound(String address) throws Exception
Description copied from interface:ActiveMQServerreturn true if there is a binding for this address (i.e. if there is a created queue)- Specified by:
isAddressBoundin interfaceActiveMQServer- Returns:
- Throws:
Exception
-
bindingQuery
public BindingQueryResult bindingQuery(SimpleString address, boolean newFQQN) throws Exception
- Specified by:
bindingQueryin interfaceActiveMQServer- Throws:
Exception
-
queueQuery
public QueueQueryResult queueQuery(SimpleString name)
- Specified by:
queueQueryin interfaceActiveMQServer
-
addressQuery
public AddressQueryResult addressQuery(SimpleString name) throws Exception
- Specified by:
addressQueryin interfaceActiveMQServer- Throws:
Exception
-
registerBrokerConnection
public void registerBrokerConnection(BrokerConnection brokerConnection)
- Specified by:
registerBrokerConnectionin interfaceActiveMQServer
-
startBrokerConnection
public void startBrokerConnection(String name) throws Exception
- Specified by:
startBrokerConnectionin interfaceActiveMQServer- Throws:
Exception
-
getBrokerConnection
protected BrokerConnection getBrokerConnection(String name)
-
stopBrokerConnection
public void stopBrokerConnection(String name) throws Exception
- Specified by:
stopBrokerConnectionin interfaceActiveMQServer- Throws:
Exception
-
getBrokerConnections
public Collection<BrokerConnection> getBrokerConnections()
- Specified by:
getBrokerConnectionsin interfaceActiveMQServer
-
threadDump
public void threadDump()
- Specified by:
threadDumpin interfaceActiveMQServer
-
fail
public final void fail(boolean failoverOnServerShutdown) throws Exception- Specified by:
failin interfaceActiveMQServer- Throws:
Exception
-
stop
public final void stop(boolean failoverOnServerShutdown, boolean isExit) throws Exception- Specified by:
stopin interfaceActiveMQServer- Throws:
Exception
-
isReplicaSync
public boolean isReplicaSync()
Description copied from interface:ActiveMQServerReturns whether the initial replication synchronization process with the backup server is complete; applicable for either the live or backup server.- Specified by:
isReplicaSyncin interfaceActiveMQServer
-
stop
public void stop(boolean failoverOnServerShutdown, boolean criticalIOError, boolean restarting)
-
checkLiveIsNotColocated
public boolean checkLiveIsNotColocated(String nodeId)
-
describe
public String describe()
- Specified by:
describein interfaceActiveMQServer
-
destroyConnectionWithSessionMetadata
public String destroyConnectionWithSessionMetadata(String metaKey, String parameterValue) throws Exception
- Specified by:
destroyConnectionWithSessionMetadatain interfaceActiveMQServer- Throws:
Exception
-
setIdentity
public void setIdentity(String identity)
Description copied from interface:ActiveMQServerSets the server identity.The identity will be exposed on logs. It may help to debug issues on the log traces and debugs.
This method was created mainly for testing but it may be used in scenarios where you need to have more than one Server inside the same VM.
- Specified by:
setIdentityin interfaceActiveMQServer
-
getIdentity
public String getIdentity()
- Specified by:
getIdentityin interfaceActiveMQServer
-
getScheduledPool
public ScheduledExecutorService getScheduledPool()
- Specified by:
getScheduledPoolin interfaceActiveMQServer
-
getConfiguration
public Configuration getConfiguration()
- Specified by:
getConfigurationin interfaceActiveMQServer
-
getPagingManager
public PagingManager getPagingManager()
- Specified by:
getPagingManagerin interfaceActiveMQServer
-
getRemotingService
public RemotingService getRemotingService()
- Specified by:
getRemotingServicein interfaceActiveMQServer
-
getStorageManager
public StorageManager getStorageManager()
- Specified by:
getStorageManagerin interfaceActiveMQServer
-
getSecurityManager
public ActiveMQSecurityManager getSecurityManager()
- Specified by:
getSecurityManagerin interfaceActiveMQServer
-
getManagementService
public ManagementService getManagementService()
- Specified by:
getManagementServicein interfaceActiveMQServer
-
getSecurityRepository
public HierarchicalRepository<Set<Role>> getSecurityRepository()
- Specified by:
getSecurityRepositoryin interfaceActiveMQServer
-
getNodeManager
public NodeManager getNodeManager()
- Specified by:
getNodeManagerin interfaceActiveMQServer
-
getAddressSettingsRepository
public HierarchicalRepository<AddressSettings> getAddressSettingsRepository()
- Specified by:
getAddressSettingsRepositoryin interfaceActiveMQServer
-
getResourceManager
public ResourceManager getResourceManager()
- Specified by:
getResourceManagerin interfaceActiveMQServer
-
getMetricsManager
public MetricsManager getMetricsManager()
- Specified by:
getMetricsManagerin interfaceActiveMQServer
-
getVersion
public Version getVersion()
- Specified by:
getVersionin interfaceActiveMQServer
-
isStarted
public boolean isStarted()
- Specified by:
isStartedin interfaceActiveMQComponent
-
getClusterManager
public ClusterManager getClusterManager()
- Specified by:
getClusterManagerin interfaceActiveMQServer
-
getConnectionRouterManager
public ConnectionRouterManager getConnectionRouterManager()
- Specified by:
getConnectionRouterManagerin interfaceActiveMQServer
-
getBackupManager
public BackupManager getBackupManager()
-
createSession
public ServerSession createSession(String name, String username, String password, int minLargeMessageSize, RemotingConnection connection, boolean autoCommitSends, boolean autoCommitAcks, boolean preAcknowledge, boolean xa, String defaultAddress, SessionCallback callback, boolean autoCreateQueues, OperationContext context, Map<SimpleString,RoutingType> prefixes, String securityDomain, String validatedUser) throws Exception
- Specified by:
createSessionin interfaceActiveMQServer- Throws:
Exception
-
validateUser
public String validateUser(String username, String password, RemotingConnection connection, String securityDomain) throws Exception
- Specified by:
validateUserin interfaceActiveMQServer- Throws:
Exception
-
createInternalSession
public ServerSession createInternalSession(String name, int minLargeMessageSize, RemotingConnection connection, boolean autoCommitSends, boolean autoCommitAcks, boolean preAcknowledge, boolean xa, String defaultAddress, SessionCallback callback, boolean autoCreateQueues, OperationContext context, Map<SimpleString,RoutingType> prefixes, String securityDomain) throws Exception
Description copied from interface:ActiveMQServerThis is to be used in places where security is bypassed, like internal sessions, broker connections, etc...- Specified by:
createInternalSessionin interfaceActiveMQServer- Throws:
Exception
-
checkQueueCreationLimit
public void checkQueueCreationLimit(String username) throws Exception
- Specified by:
checkQueueCreationLimitin interfaceActiveMQServer- Throws:
Exception
-
getQueueCountForUser
public int getQueueCountForUser(String username) throws Exception
- Throws:
Exception
-
internalCreateSession
protected ServerSessionImpl internalCreateSession(String name, String username, String password, String validatedUser, int minLargeMessageSize, RemotingConnection connection, boolean autoCommitSends, boolean autoCommitAcks, boolean preAcknowledge, boolean xa, String defaultAddress, SessionCallback callback, OperationContext context, boolean autoCreateQueues, Map<SimpleString,RoutingType> prefixes, String securityDomain) throws Exception
- Throws:
Exception
-
getSecurityStore
public SecurityStore getSecurityStore()
- Specified by:
getSecurityStorein interfaceActiveMQServer
-
removeSession
public void removeSession(String name) throws Exception
- Specified by:
removeSessionin interfaceActiveMQServer- Throws:
Exception
-
lookupSession
public ServerSession lookupSession(String key, String value)
- Specified by:
lookupSessionin interfaceActiveMQServer- Returns:
- a session containing the meta-key and meata-value
-
getSessions
public List<ServerSession> getSessions(String connectionID)
- Specified by:
getSessionsin interfaceActiveMQServer
-
getSessions
public Set<ServerSession> getSessions()
- Specified by:
getSessionsin interfaceActiveMQServer
-
isActive
public boolean isActive()
- Specified by:
isActivein interfaceActiveMQServer
-
waitForActivation
public boolean waitForActivation(long timeout, TimeUnit unit) throws InterruptedExceptionDescription copied from interface:ActiveMQServerWait for server initialization.- Specified by:
waitForActivationin interfaceActiveMQServer- Returns:
trueif the server was already initialized or if it was initialized within the timeout period,falseotherwise.- Throws:
InterruptedException- See Also:
CountDownLatch.await(long, java.util.concurrent.TimeUnit)
-
getActiveMQServerControl
public ActiveMQServerControlImpl getActiveMQServerControl()
Description copied from interface:ActiveMQServerReturns the resource to manage this ActiveMQ Artemis server.- Specified by:
getActiveMQServerControlin interfaceActiveMQServer
-
getConnectionCount
public int getConnectionCount()
- Specified by:
getConnectionCountin interfaceActiveMQServer
-
getTotalConnectionCount
public long getTotalConnectionCount()
- Specified by:
getTotalConnectionCountin interfaceActiveMQServer
-
getTotalMessageCount
public long getTotalMessageCount()
- Specified by:
getTotalMessageCountin interfaceActiveMQServer
-
getTotalMessagesAdded
public long getTotalMessagesAdded()
- Specified by:
getTotalMessagesAddedin interfaceActiveMQServer
-
getTotalMessagesAcknowledged
public long getTotalMessagesAcknowledged()
- Specified by:
getTotalMessagesAcknowledgedin interfaceActiveMQServer
-
getTotalConsumerCount
public long getTotalConsumerCount()
- Specified by:
getTotalConsumerCountin interfaceActiveMQServer
-
getPostOffice
public PostOffice getPostOffice()
- Specified by:
getPostOfficein interfaceActiveMQServer
-
getQueueFactory
public QueueFactory getQueueFactory()
- Specified by:
getQueueFactoryin interfaceActiveMQServer
-
getNodeID
public SimpleString getNodeID()
- Specified by:
getNodeIDin interfaceActiveMQServer
-
createQueue
@Deprecated public Queue createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filterString, boolean durable, boolean temporary) throws Exception
Deprecated.- Specified by:
createQueuein interfaceActiveMQServer- Throws:
Exception
-
createQueue
@Deprecated public Queue createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString user, SimpleString filterString, boolean durable, boolean temporary) throws Exception
Deprecated.- Specified by:
createQueuein interfaceActiveMQServer- Throws:
Exception
-
createQueue
@Deprecated public Queue createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, boolean durable, boolean temporary, int maxConsumers, boolean purgeOnNoConsumers, boolean autoCreateAddress) throws Exception
Deprecated.- Specified by:
createQueuein interfaceActiveMQServer- Throws:
Exception
-
createQueue
@Deprecated public Queue createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, boolean durable, boolean temporary, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount, boolean autoCreateAddress) throws Exception
Deprecated.- Specified by:
createQueuein interfaceActiveMQServer- Throws:
Exception
-
createQueue
@Deprecated public Queue createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, boolean durable, boolean temporary, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, SimpleString groupFirstKey, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount, boolean autoCreateAddress) throws Exception
Deprecated.- Specified by:
createQueuein interfaceActiveMQServer- Throws:
Exception
-
createQueue
@Deprecated public Queue createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, boolean durable, boolean temporary, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, SimpleString groupFirstKey, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount, boolean autoCreateAddress, long ringSize) throws Exception
Deprecated.- Specified by:
createQueuein interfaceActiveMQServer- Throws:
Exception
-
createQueue
@Deprecated public Queue createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean autoCreated, Integer maxConsumers, Boolean purgeOnNoConsumers, boolean autoCreateAddress) throws Exception
Deprecated.- Specified by:
createQueuein interfaceActiveMQServer- Throws:
Exception
-
createQueue
@Deprecated public Queue createQueue(AddressInfo addressInfo, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean autoCreated, Integer maxConsumers, Boolean purgeOnNoConsumers, boolean autoCreateAddress) throws Exception
Deprecated.- Specified by:
createQueuein interfaceActiveMQServer- Throws:
Exception
-
createQueue
@Deprecated public Queue createQueue(AddressInfo addressInfo, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean autoCreated, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean lastValue, boolean autoCreateAddress) throws Exception
Deprecated.- Specified by:
createQueuein interfaceActiveMQServer- Throws:
Exception
-
createQueue
@Deprecated public Queue createQueue(AddressInfo addressInfo, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean autoCreated, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, Boolean lastValue, SimpleString lastValueKey, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, Boolean autoDelete, Long autoDeleteDelay, Long autoDeleteMessageCount, boolean autoCreateAddress) throws Exception
Deprecated.- Specified by:
createQueuein interfaceActiveMQServer- Throws:
Exception
-
createQueue
@Deprecated public Queue createQueue(AddressInfo addressInfo, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean autoCreated, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, SimpleString groupFirstKey, Boolean lastValue, SimpleString lastValueKey, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, Boolean autoDelete, Long autoDeleteDelay, Long autoDeleteMessageCount, boolean autoCreateAddress) throws Exception
Deprecated.- Specified by:
createQueuein interfaceActiveMQServer- Throws:
Exception
-
createQueue
@Deprecated public Queue createQueue(AddressInfo addressInfo, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean autoCreated, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, SimpleString groupFirstKey, Boolean lastValue, SimpleString lastValueKey, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, Boolean autoDelete, Long autoDeleteDelay, Long autoDeleteMessageCount, boolean autoCreateAddress, Long ringSize) throws Exception
Deprecated.- Specified by:
createQueuein interfaceActiveMQServer- Throws:
Exception
-
createQueue
@Deprecated public Queue createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean ignoreIfExists, boolean transientQueue, boolean autoCreated, int maxConsumers, boolean purgeOnNoConsumers, boolean autoCreateAddress) throws Exception
Deprecated.- Specified by:
createQueuein interfaceActiveMQServer- Throws:
Exception
-
createQueue
@Deprecated public Queue createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean ignoreIfExists, boolean transientQueue, boolean autoCreated, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean lastValue, boolean autoCreateAddress) throws Exception
Deprecated.- Specified by:
createQueuein interfaceActiveMQServer- Throws:
Exception
-
createQueue
@Deprecated public Queue createQueue(SimpleString address, SimpleString queueName, SimpleString filterString, boolean durable, boolean temporary) throws Exception
Deprecated.- Specified by:
createQueuein interfaceActiveMQServer- Throws:
Exception
-
createSharedQueue
@Deprecated public void createSharedQueue(SimpleString address, RoutingType routingType, SimpleString name, SimpleString filterString, SimpleString user, boolean durable) throws Exception
Deprecated.Description copied from interface:ActiveMQServerCreates a transient queue. A queue that will exist as long as there are consumers. The queue will be deleted as soon as all the consumers are removed.Notice: the queue won't be deleted until the first consumer arrives.
- Specified by:
createSharedQueuein interfaceActiveMQServer- Throws:
ActiveMQInvalidTransientQueueUseException- if the shared queue already exists with a differentaddressorfilterStringNullPointerException- ifaddressisnullException
-
createSharedQueue
@Deprecated public void createSharedQueue(SimpleString address, RoutingType routingType, SimpleString name, SimpleString filterString, SimpleString user, boolean durable, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean lastValue) throws Exception
Deprecated.- Specified by:
createSharedQueuein interfaceActiveMQServer- Throws:
Exception
-
createSharedQueue
@Deprecated public void createSharedQueue(SimpleString address, RoutingType routingType, SimpleString name, SimpleString filterString, SimpleString user, boolean durable, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount) throws Exception
Deprecated.- Specified by:
createSharedQueuein interfaceActiveMQServer- Throws:
Exception
-
createSharedQueue
@Deprecated public void createSharedQueue(SimpleString address, RoutingType routingType, SimpleString name, SimpleString filterString, SimpleString user, boolean durable, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, SimpleString groupFirstKey, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount) throws Exception
Deprecated.- Specified by:
createSharedQueuein interfaceActiveMQServer- Throws:
Exception
-
createSharedQueue
public void createSharedQueue(QueueConfiguration queueConfiguration) throws Exception
Description copied from interface:ActiveMQServerThis method is essentially the same asActiveMQServer.createQueue(QueueConfiguration, boolean)with a few key exceptions.If
durableistruethen:transientwill be forced tofalsetemporarywill be forced tofalse
If
durableisfalsethen:transientwill be forced totruetemporarywill be forced totrue
In all instances
autoCreatedwill be forced tofalseandautoCreatedAddresswill be forced totrue. Thebooleanpassed toActiveMQServer.createQueue(QueueConfiguration, boolean)will always be true;- Specified by:
createSharedQueuein interfaceActiveMQServer- Throws:
ActiveMQInvalidTransientQueueUseException- if the shared queue already exists with a differentaddressorfilterStringException- See Also:
ActiveMQServer.createQueue(QueueConfiguration, boolean)
-
locateQueue
public Queue locateQueue(SimpleString queueName)
- Specified by:
locateQueuein interfaceActiveMQServer
-
deployQueue
@Deprecated public Queue deployQueue(SimpleString address, SimpleString resourceName, SimpleString filterString, boolean durable, boolean temporary) throws Exception
Deprecated.- Specified by:
deployQueuein interfaceActiveMQServer- Throws:
Exception
-
deployQueue
@Deprecated public Queue deployQueue(String address, String resourceName, String filterString, boolean durable, boolean temporary) throws Exception
Deprecated.- Specified by:
deployQueuein interfaceActiveMQServer- Throws:
Exception
-
destroyQueue
public void destroyQueue(SimpleString queueName) throws Exception
- Specified by:
destroyQueuein interfaceActiveMQServer- Throws:
Exception
-
destroyQueue
public void destroyQueue(SimpleString queueName, SecurityAuth session) throws Exception
- Specified by:
destroyQueuein interfaceActiveMQServer- Throws:
Exception
-
destroyQueue
public void destroyQueue(SimpleString queueName, SecurityAuth session, boolean checkConsumerCount) throws Exception
- Specified by:
destroyQueuein interfaceActiveMQServer- Throws:
Exception
-
destroyQueue
public void destroyQueue(SimpleString queueName, SecurityAuth session, boolean checkConsumerCount, boolean removeConsumers) throws Exception
- Specified by:
destroyQueuein interfaceActiveMQServer- Throws:
Exception
-
destroyQueue
public void destroyQueue(SimpleString queueName, SecurityAuth session, boolean checkConsumerCount, boolean removeConsumers, boolean forceAutoDeleteAddress) throws Exception
- Specified by:
destroyQueuein interfaceActiveMQServer- Throws:
Exception
-
destroyQueue
public void destroyQueue(SimpleString queueName, SecurityAuth session, boolean checkConsumerCount, boolean removeConsumers, boolean forceAutoDeleteAddress, boolean checkMessageCount) throws Exception
- Specified by:
destroyQueuein interfaceActiveMQServer- Throws:
Exception
-
clearAddressCache
public void clearAddressCache()
- Specified by:
clearAddressCachein interfaceActiveMQServer
-
registerActivateCallback
public void registerActivateCallback(ActivateCallback callback)
- Specified by:
registerActivateCallbackin interfaceActiveMQServer
-
unregisterActivateCallback
public void unregisterActivateCallback(ActivateCallback callback)
- Specified by:
unregisterActivateCallbackin interfaceActiveMQServer
-
registerActivationFailureListener
public void registerActivationFailureListener(ActivationFailureListener listener)
Description copied from interface:ActiveMQServerRegister a listener to detect problems during activation- Specified by:
registerActivationFailureListenerin interfaceActiveMQServer- See Also:
ActivationFailureListener
-
unregisterActivationFailureListener
public void unregisterActivationFailureListener(ActivationFailureListener listener)
Description copied from interface:ActiveMQServerRemove a previously registered failure listener- Specified by:
unregisterActivationFailureListenerin interfaceActiveMQServer
-
callActivationFailureListeners
public void callActivationFailureListeners(Exception e)
Description copied from interface:ActiveMQServerAlert activation failure listeners of a failure.- Specified by:
callActivationFailureListenersin interfaceActiveMQServer- Parameters:
e- the exception that caused the activation failure
-
registerPostQueueCreationCallback
public void registerPostQueueCreationCallback(PostQueueCreationCallback callback)
- Specified by:
registerPostQueueCreationCallbackin interfaceActiveMQServer- Parameters:
callback-PostQueueCreationCallback
-
unregisterPostQueueCreationCallback
public void unregisterPostQueueCreationCallback(PostQueueCreationCallback callback)
- Specified by:
unregisterPostQueueCreationCallbackin interfaceActiveMQServer- Parameters:
callback-PostQueueCreationCallback
-
callPostQueueCreationCallbacks
public void callPostQueueCreationCallbacks(SimpleString queueName) throws Exception
- Specified by:
callPostQueueCreationCallbacksin interfaceActiveMQServer- Throws:
Exception
-
registerPostQueueDeletionCallback
public void registerPostQueueDeletionCallback(PostQueueDeletionCallback callback)
- Specified by:
registerPostQueueDeletionCallbackin interfaceActiveMQServer- Parameters:
callback-PostQueueDeletionCallback
-
unregisterPostQueueDeletionCallback
public void unregisterPostQueueDeletionCallback(PostQueueDeletionCallback callback)
- Specified by:
unregisterPostQueueDeletionCallbackin interfaceActiveMQServer- Parameters:
callback-PostQueueDeletionCallback
-
callPostQueueDeletionCallbacks
public void callPostQueueDeletionCallbacks(SimpleString address, SimpleString queueName) throws Exception
- Specified by:
callPostQueueDeletionCallbacksin interfaceActiveMQServer- Throws:
Exception
-
registerBrokerPlugins
public void registerBrokerPlugins(List<ActiveMQServerBasePlugin> plugins)
- Specified by:
registerBrokerPluginsin interfaceActiveMQServer
-
registerBrokerPlugin
public void registerBrokerPlugin(ActiveMQServerBasePlugin plugin)
- Specified by:
registerBrokerPluginin interfaceActiveMQServer
-
unRegisterBrokerPlugin
public void unRegisterBrokerPlugin(ActiveMQServerBasePlugin plugin)
- Specified by:
unRegisterBrokerPluginin interfaceActiveMQServer
-
getBrokerPlugins
public List<ActiveMQServerBasePlugin> getBrokerPlugins()
- Specified by:
getBrokerPluginsin interfaceActiveMQServer
-
getBrokerConnectionPlugins
public List<ActiveMQServerConnectionPlugin> getBrokerConnectionPlugins()
- Specified by:
getBrokerConnectionPluginsin interfaceActiveMQServer
-
getBrokerSessionPlugins
public List<ActiveMQServerSessionPlugin> getBrokerSessionPlugins()
- Specified by:
getBrokerSessionPluginsin interfaceActiveMQServer
-
getBrokerConsumerPlugins
public List<ActiveMQServerConsumerPlugin> getBrokerConsumerPlugins()
- Specified by:
getBrokerConsumerPluginsin interfaceActiveMQServer
-
getBrokerAddressPlugins
public List<ActiveMQServerAddressPlugin> getBrokerAddressPlugins()
- Specified by:
getBrokerAddressPluginsin interfaceActiveMQServer
-
getBrokerQueuePlugins
public List<ActiveMQServerQueuePlugin> getBrokerQueuePlugins()
- Specified by:
getBrokerQueuePluginsin interfaceActiveMQServer
-
getBrokerBindingPlugins
public List<ActiveMQServerBindingPlugin> getBrokerBindingPlugins()
- Specified by:
getBrokerBindingPluginsin interfaceActiveMQServer
-
getBrokerMessagePlugins
public List<ActiveMQServerMessagePlugin> getBrokerMessagePlugins()
- Specified by:
getBrokerMessagePluginsin interfaceActiveMQServer
-
getBrokerBridgePlugins
public List<ActiveMQServerBridgePlugin> getBrokerBridgePlugins()
- Specified by:
getBrokerBridgePluginsin interfaceActiveMQServer
-
getBrokerCriticalPlugins
public List<ActiveMQServerCriticalPlugin> getBrokerCriticalPlugins()
- Specified by:
getBrokerCriticalPluginsin interfaceActiveMQServer
-
getBrokerFederationPlugins
public List<ActiveMQServerFederationPlugin> getBrokerFederationPlugins()
- Specified by:
getBrokerFederationPluginsin interfaceActiveMQServer
-
getBrokerResourcePlugins
public List<ActiveMQServerResourcePlugin> getBrokerResourcePlugins()
- Specified by:
getBrokerResourcePluginsin interfaceActiveMQServer
-
callBrokerPlugins
public void callBrokerPlugins(ActiveMQPluginRunnable pluginRun) throws ActiveMQException
- Specified by:
callBrokerPluginsin interfaceActiveMQServer- Throws:
ActiveMQException
-
callBrokerConnectionPlugins
public void callBrokerConnectionPlugins(ActiveMQPluginRunnable<ActiveMQServerConnectionPlugin> pluginRun) throws ActiveMQException
- Specified by:
callBrokerConnectionPluginsin interfaceActiveMQServer- Throws:
ActiveMQException
-
callBrokerSessionPlugins
public void callBrokerSessionPlugins(ActiveMQPluginRunnable<ActiveMQServerSessionPlugin> pluginRun) throws ActiveMQException
- Specified by:
callBrokerSessionPluginsin interfaceActiveMQServer- Throws:
ActiveMQException
-
callBrokerConsumerPlugins
public void callBrokerConsumerPlugins(ActiveMQPluginRunnable<ActiveMQServerConsumerPlugin> pluginRun) throws ActiveMQException
- Specified by:
callBrokerConsumerPluginsin interfaceActiveMQServer- Throws:
ActiveMQException
-
callBrokerAddressPlugins
public void callBrokerAddressPlugins(ActiveMQPluginRunnable<ActiveMQServerAddressPlugin> pluginRun) throws ActiveMQException
- Specified by:
callBrokerAddressPluginsin interfaceActiveMQServer- Throws:
ActiveMQException
-
callBrokerQueuePlugins
public void callBrokerQueuePlugins(ActiveMQPluginRunnable<ActiveMQServerQueuePlugin> pluginRun) throws ActiveMQException
- Specified by:
callBrokerQueuePluginsin interfaceActiveMQServer- Throws:
ActiveMQException
-
callBrokerBindingPlugins
public void callBrokerBindingPlugins(ActiveMQPluginRunnable<ActiveMQServerBindingPlugin> pluginRun) throws ActiveMQException
- Specified by:
callBrokerBindingPluginsin interfaceActiveMQServer- Throws:
ActiveMQException
-
callBrokerMessagePlugins
public void callBrokerMessagePlugins(ActiveMQPluginRunnable<ActiveMQServerMessagePlugin> pluginRun) throws ActiveMQException
- Specified by:
callBrokerMessagePluginsin interfaceActiveMQServer- Throws:
ActiveMQException
-
callBrokerMessagePluginsCanAccept
public boolean callBrokerMessagePluginsCanAccept(ServerConsumer serverConsumer, MessageReference messageReference) throws ActiveMQException
- Specified by:
callBrokerMessagePluginsCanAcceptin interfaceActiveMQServer- Throws:
ActiveMQException
-
callBrokerBridgePlugins
public void callBrokerBridgePlugins(ActiveMQPluginRunnable<ActiveMQServerBridgePlugin> pluginRun) throws ActiveMQException
- Specified by:
callBrokerBridgePluginsin interfaceActiveMQServer- Throws:
ActiveMQException
-
callBrokerCriticalPlugins
public void callBrokerCriticalPlugins(ActiveMQPluginRunnable<ActiveMQServerCriticalPlugin> pluginRun) throws ActiveMQException
- Specified by:
callBrokerCriticalPluginsin interfaceActiveMQServer- Throws:
ActiveMQException
-
callBrokerFederationPlugins
public void callBrokerFederationPlugins(ActiveMQPluginRunnable<ActiveMQServerFederationPlugin> pluginRun) throws ActiveMQException
- Specified by:
callBrokerFederationPluginsin interfaceActiveMQServer- Throws:
ActiveMQException
-
callBrokerResourcePlugins
public void callBrokerResourcePlugins(ActiveMQPluginRunnable<ActiveMQServerResourcePlugin> pluginRun) throws ActiveMQException
- Specified by:
callBrokerResourcePluginsin interfaceActiveMQServer- Throws:
ActiveMQException
-
hasBrokerPlugins
public boolean hasBrokerPlugins()
- Specified by:
hasBrokerPluginsin interfaceActiveMQServer
-
hasBrokerConnectionPlugins
public boolean hasBrokerConnectionPlugins()
- Specified by:
hasBrokerConnectionPluginsin interfaceActiveMQServer
-
hasBrokerSessionPlugins
public boolean hasBrokerSessionPlugins()
- Specified by:
hasBrokerSessionPluginsin interfaceActiveMQServer
-
hasBrokerConsumerPlugins
public boolean hasBrokerConsumerPlugins()
- Specified by:
hasBrokerConsumerPluginsin interfaceActiveMQServer
-
hasBrokerAddressPlugins
public boolean hasBrokerAddressPlugins()
- Specified by:
hasBrokerAddressPluginsin interfaceActiveMQServer
-
hasBrokerQueuePlugins
public boolean hasBrokerQueuePlugins()
- Specified by:
hasBrokerQueuePluginsin interfaceActiveMQServer
-
hasBrokerBindingPlugins
public boolean hasBrokerBindingPlugins()
- Specified by:
hasBrokerBindingPluginsin interfaceActiveMQServer
-
hasBrokerMessagePlugins
public boolean hasBrokerMessagePlugins()
- Specified by:
hasBrokerMessagePluginsin interfaceActiveMQServer
-
hasBrokerBridgePlugins
public boolean hasBrokerBridgePlugins()
- Specified by:
hasBrokerBridgePluginsin interfaceActiveMQServer
-
hasBrokerCriticalPlugins
public boolean hasBrokerCriticalPlugins()
- Specified by:
hasBrokerCriticalPluginsin interfaceActiveMQServer
-
hasBrokerFederationPlugins
public boolean hasBrokerFederationPlugins()
- Specified by:
hasBrokerFederationPluginsin interfaceActiveMQServer
-
hasBrokerResourcePlugins
public boolean hasBrokerResourcePlugins()
- Specified by:
hasBrokerResourcePluginsin interfaceActiveMQServer
-
getExecutorFactory
public ExecutorFactory getExecutorFactory()
- Specified by:
getExecutorFactoryin interfaceActiveMQServer
-
getIOExecutorFactory
public ExecutorFactory getIOExecutorFactory()
- Specified by:
getIOExecutorFactoryin interfaceActiveMQServer
-
setGroupingHandler
public void setGroupingHandler(GroupingHandler groupingHandler)
- Specified by:
setGroupingHandlerin interfaceActiveMQServer
-
getGroupingHandler
public GroupingHandler getGroupingHandler()
- Specified by:
getGroupingHandlerin interfaceActiveMQServer
-
getReplicationManager
public ReplicationManager getReplicationManager()
- Specified by:
getReplicationManagerin interfaceActiveMQServer
-
getConnectorsService
public ConnectorsService getConnectorsService()
- Specified by:
getConnectorsServicein interfaceActiveMQServer
-
getFederationManager
public FederationManager getFederationManager()
- Specified by:
getFederationManagerin interfaceActiveMQServer
-
deployDivert
public Divert deployDivert(DivertConfiguration config) throws Exception
- Specified by:
deployDivertin interfaceActiveMQServer- Throws:
Exception
-
updateDivert
public Divert updateDivert(DivertConfiguration config) throws Exception
- Specified by:
updateDivertin interfaceActiveMQServer- Throws:
Exception
-
destroyDivert
public void destroyDivert(SimpleString name) throws Exception
- Specified by:
destroyDivertin interfaceActiveMQServer- Throws:
Exception
-
deployBridge
public boolean deployBridge(BridgeConfiguration config) throws Exception
- Specified by:
deployBridgein interfaceActiveMQServer- Throws:
Exception
-
destroyBridge
public void destroyBridge(String name) throws Exception
- Specified by:
destroyBridgein interfaceActiveMQServer- Throws:
Exception
-
deployFederation
public void deployFederation(FederationConfiguration config) throws Exception
- Specified by:
deployFederationin interfaceActiveMQServer- Throws:
Exception
-
undeployFederation
public void undeployFederation(String name) throws Exception
- Specified by:
undeployFederationin interfaceActiveMQServer- Throws:
Exception
-
getSessionByID
public ServerSession getSessionByID(String sessionName)
- Specified by:
getSessionByIDin interfaceActiveMQServer
-
replaceQueueFactory
public void replaceQueueFactory(QueueFactory factory)
For tests only, don't use this method as it's not part of the API- Parameters:
factory-
-
createPagingManager
public PagingManager createPagingManager() throws Exception
- Specified by:
createPagingManagerin interfaceActiveMQServer- Throws:
Exception
-
getPagingStoreFactory
protected PagingStoreFactory getPagingStoreFactory() throws Exception
- Throws:
Exception
-
createStorageManager
protected StorageManager createStorageManager()
This method is protected as it may be used as a hook for creating a custom storage manager (on tests for instance)
-
getServiceRegistry
public ServiceRegistry getServiceRegistry()
- Specified by:
getServiceRegistryin interfaceActiveMQServer
-
installMirrorController
public void installMirrorController(MirrorController mirrorController)
- Specified by:
installMirrorControllerin interfaceActiveMQServer
-
scanAddresses
public void scanAddresses(MirrorController mirrorController) throws Exception
Description copied from interface:ActiveMQServerThis method will scan all queues and addresses. it is supposed to be called before the mirrorController is started- Specified by:
scanAddressesin interfaceActiveMQServer- Throws:
Exception
-
getMirrorController
public MirrorController getMirrorController()
- Specified by:
getMirrorControllerin interfaceActiveMQServer
-
removeMirrorControl
public void removeMirrorControl()
- Specified by:
removeMirrorControlin interfaceActiveMQServer
-
injectMonitor
public void injectMonitor(FileStoreMonitor storeMonitor) throws Exception
This method exists for a possibility of test cases replacing the FileStoreMonitor for an extension that would for instance pretend a disk full on certain tests.- Throws:
Exception
-
getMonitor
public FileStoreMonitor getMonitor()
-
completeActivation
public void completeActivation(boolean replicated) throws Exception- Throws:
Exception
-
getDiskStoreUsage
public double getDiskStoreUsage()
- Specified by:
getDiskStoreUsagein interfaceActiveMQServer
-
updateAddressInfo
public boolean updateAddressInfo(SimpleString address, EnumSet<RoutingType> routingTypes) throws Exception
Description copied from interface:ActiveMQServerUpdates anAddressInfoon the broker with the specified routing types.- Specified by:
updateAddressInfoin interfaceActiveMQServer- Parameters:
address- the name of theAddressInfoto updateroutingTypes- the routing types to update theAddressInfowith- Returns:
trueif theAddressInfowas updated,falseotherwise- Throws:
Exception
-
updateAddressInfo
public boolean updateAddressInfo(SimpleString address, Collection<RoutingType> routingTypes) throws Exception
- Specified by:
updateAddressInfoin interfaceActiveMQServer- Throws:
Exception
-
addAddressInfo
public boolean addAddressInfo(AddressInfo addressInfo) throws Exception
Description copied from interface:ActiveMQServerAdd theAddressInfoto the broker- Specified by:
addAddressInfoin interfaceActiveMQServer- Parameters:
addressInfo- theAddressInfoto add- Returns:
trueif theAddressInfowas added,falseotherwise- Throws:
Exception
-
addOrUpdateAddressInfo
public AddressInfo addOrUpdateAddressInfo(AddressInfo addressInfo) throws Exception
Description copied from interface:ActiveMQServerA convenience method to combine the functionality ofaddAddressInfoandupdateAddressInfo. It will add theAddressInfoobject to the broker if it doesn't exist or update it if it does.- Specified by:
addOrUpdateAddressInfoin interfaceActiveMQServer- Parameters:
addressInfo- theAddressInfoto add or the info used to update the existingAddressInfo- Returns:
- the resulting
AddressInfo - Throws:
Exception
-
removeAddressInfo
public void removeAddressInfo(SimpleString address, SecurityAuth auth) throws Exception
Description copied from interface:ActiveMQServerRemove anAddressInfofrom the broker.- Specified by:
removeAddressInfoin interfaceActiveMQServer- Parameters:
address- theAddressInfoto removeauth- authorization information;nullis valid- Throws:
Exception
-
autoRemoveAddressInfo
public void autoRemoveAddressInfo(SimpleString address, SecurityAuth auth) throws Exception
Description copied from interface:ActiveMQServerRemove anAddressInfofrom the broker.- Specified by:
autoRemoveAddressInfoin interfaceActiveMQServer- Parameters:
address- theAddressInfoto removeauth- authorization information;nullis valid- Throws:
Exception
-
removeAddressInfo
public void removeAddressInfo(SimpleString address, SecurityAuth auth, boolean force) throws Exception
Description copied from interface:ActiveMQServerRemove anAddressInfofrom the broker.- Specified by:
removeAddressInfoin interfaceActiveMQServer- Parameters:
address- theAddressInfoto removeauth- authorization information;nullis validforce- It will disconnect everything from the address including queues and consumers- Throws:
Exception
-
getInternalNamingPrefix
public String getInternalNamingPrefix()
- Specified by:
getInternalNamingPrefixin interfaceActiveMQServer
-
getAddressInfo
public AddressInfo getAddressInfo(SimpleString address)
- Specified by:
getAddressInfoin interfaceActiveMQServer
-
createQueue
@Deprecated public Queue createQueue(AddressInfo addrInfo, SimpleString queueName, SimpleString filterString, SimpleString user, boolean durable, boolean temporary, boolean ignoreIfExists, boolean transientQueue, boolean autoCreated, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, SimpleString groupFirstKey, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount, boolean autoCreateAddress, boolean configurationManaged, long ringSize) throws Exception
Deprecated.- Throws:
Exception
-
createQueue
public Queue createQueue(QueueConfiguration queueConfiguration) throws Exception
Description copied from interface:ActiveMQServerOverloaded version ofActiveMQServer.createQueue(QueueConfiguration, boolean)where thebooleanparameter is alwaysfalse(i.e. if the queue already exists then an exception will be thrown).- Specified by:
createQueuein interfaceActiveMQServer- Throws:
Exception- See Also:
ActiveMQServer.createQueue(QueueConfiguration, boolean)
-
createQueue
public Queue createQueue(QueueConfiguration queueConfiguration, boolean ignoreIfExists) throws Exception
Description copied from interface:ActiveMQServerThis method creates a queue based on theQueueConfigurationinput. SeeQueueConfigurationfor more details on configuration specifics.Some dynamic defaults will be enforced via address-settings for the corresponding unset properties:
maxConsumersexclusivegroupRebalancegroupBucketsgroupFirstKeylastValuelastValueKeynonDestructiveconsumersBeforeDispatchdelayBeforeDispatchringSizeroutingTypepurgeOnNoConsumersautoCreateAddressautoDelete(only set if queue was auto-created)autoDeleteDelayautoDeleteMessageCount
- Specified by:
createQueuein interfaceActiveMQServer- Parameters:
queueConfiguration- the configuration to use when creating the queueignoreIfExists- whether or not to simply return without an exception if the queue exists- Returns:
- the
Queueinstance that was created - Throws:
Exception
-
getRuntimeTempQueueNamespace
public String getRuntimeTempQueueNamespace(boolean temporary)
-
createQueue
@Deprecated public Queue createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filterString, SimpleString user, boolean durable, boolean temporary, boolean ignoreIfExists, boolean transientQueue, boolean autoCreated, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount, boolean autoCreateAddress) throws Exception
Deprecated.- Specified by:
createQueuein interfaceActiveMQServer- Throws:
Exception
-
createQueue
@Deprecated public Queue createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filterString, SimpleString user, boolean durable, boolean temporary, boolean ignoreIfExists, boolean transientQueue, boolean autoCreated, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, SimpleString groupFirstKey, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount, boolean autoCreateAddress) throws Exception
Deprecated.- Specified by:
createQueuein interfaceActiveMQServer- Throws:
Exception
-
createQueue
@Deprecated public Queue createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filterString, SimpleString user, boolean durable, boolean temporary, boolean ignoreIfExists, boolean transientQueue, boolean autoCreated, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, SimpleString groupFirstKey, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount, boolean autoCreateAddress, long ringSize) throws Exception
Deprecated.- Specified by:
createQueuein interfaceActiveMQServer- Throws:
Exception
-
updateQueue
@Deprecated public Queue updateQueue(String name, RoutingType routingType, Integer maxConsumers, Boolean purgeOnNoConsumers) throws Exception
Deprecated.- Specified by:
updateQueuein interfaceActiveMQServer- Throws:
Exception
-
updateQueue
@Deprecated public Queue updateQueue(String name, RoutingType routingType, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive) throws Exception
Deprecated.- Specified by:
updateQueuein interfaceActiveMQServer- Throws:
Exception
-
updateQueue
@Deprecated public Queue updateQueue(String name, RoutingType routingType, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, String user) throws Exception
Deprecated.- Specified by:
updateQueuein interfaceActiveMQServer- Throws:
Exception
-
updateQueue
@Deprecated public Queue updateQueue(String name, RoutingType routingType, String filterString, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, String user) throws Exception
Deprecated.- Specified by:
updateQueuein interfaceActiveMQServer- Throws:
Exception
-
updateQueue
@Deprecated public Queue updateQueue(String name, RoutingType routingType, String filterString, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, String groupFirstKey, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, String user) throws Exception
Deprecated.- Specified by:
updateQueuein interfaceActiveMQServer- Throws:
Exception
-
updateQueue
@Deprecated public Queue updateQueue(String name, RoutingType routingType, String filterString, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, String groupFirstKey, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, String user, Long ringSize) throws Exception
Deprecated.- Specified by:
updateQueuein interfaceActiveMQServer- Throws:
Exception
-
updateQueue
public Queue updateQueue(QueueConfiguration queueConfiguration) throws Exception
Description copied from interface:ActiveMQServerUpdate the queue named in theQueueConfigurationwith the corresponding properties. Set only the properties that you wish to change from their existing values. Only the following properties can actually be updated:routingTypefiltermaxConsumerspurgeOnNoConsumersexclusivenonDestructivegroupRebalancegroupFirstKeygroupBucketsconsumersBeforeDispatchdelayBeforeDispatchconfigurationManageduserringSize
- Specified by:
updateQueuein interfaceActiveMQServer- Parameters:
queueConfiguration- theQueueConfigurationto use- Returns:
- the updated
Queueinstance - Throws:
Exception
-
updateQueue
public Queue updateQueue(QueueConfiguration queueConfiguration, boolean forceUpdate) throws Exception
- Specified by:
updateQueuein interfaceActiveMQServer- Parameters:
queueConfiguration- theQueueConfigurationto useforceUpdate- Iftrue, nonullcheck is performed and unset queueConfiguration values are reset tonull- Returns:
- the updated
Queueinstance - Throws:
Exception- See Also:
ActiveMQServer.updateQueue(QueueConfiguration)
-
checkJournalDirectory
public void checkJournalDirectory()
Check if journal directory exists or create it (if configured to do so)
-
addProtocolManagerFactory
public void addProtocolManagerFactory(ProtocolManagerFactory factory)
- Specified by:
addProtocolManagerFactoryin interfaceActiveMQServer
-
removeProtocolManagerFactory
public void removeProtocolManagerFactory(ProtocolManagerFactory factory)
- Specified by:
removeProtocolManagerFactoryin interfaceActiveMQServer
-
createBackupServer
public ActiveMQServer createBackupServer(Configuration configuration)
- Specified by:
createBackupServerin interfaceActiveMQServer
-
addScaledDownNode
public void addScaledDownNode(SimpleString scaledDownNodeId)
- Specified by:
addScaledDownNodein interfaceActiveMQServer
-
hasScaledDown
public boolean hasScaledDown(SimpleString scaledDownNodeId)
- Specified by:
hasScaledDownin interfaceActiveMQServer
-
getUptime
public String getUptime()
- Specified by:
getUptimein interfaceActiveMQServer
-
getUptimeMillis
public long getUptimeMillis()
- Specified by:
getUptimeMillisin interfaceActiveMQServer
-
addClientConnection
public boolean addClientConnection(String clientId, boolean unique)
- Specified by:
addClientConnectionin interfaceActiveMQServer
-
removeClientConnection
public void removeClientConnection(String clientId)
- Specified by:
removeClientConnectionin interfaceActiveMQServer
-
reloadConfigurationFile
public void reloadConfigurationFile() throws Exception- Specified by:
reloadConfigurationFilein interfaceActiveMQServer- Throws:
Exception
-
getActivateCallbacks
public Set<ActivateCallback> getActivateCallbacks()
-
getExternalComponents
public List<ActiveMQComponent> getExternalComponents()
- Specified by:
getExternalComponentsin interfaceActiveMQServer
-
-