public class ActiveMQServerImpl extends Object implements ActiveMQServer
Modifier and Type | Class and Description |
---|---|
class |
ActiveMQServerImpl.ShutdownOnCriticalErrorListener |
Modifier and Type | Field and Description |
---|---|
static String |
GENERIC_IGNORED_FILTER
Deprecated.
Replaced by
Filter.GENERIC_IGNORED_FILTER |
Constructor and Description |
---|
ActiveMQServerImpl() |
ActiveMQServerImpl(Configuration configuration) |
ActiveMQServerImpl(Configuration configuration,
ActiveMQSecurityManager securityManager) |
ActiveMQServerImpl(Configuration configuration,
ActiveMQServer parentServer) |
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) |
@Deprecated public static final String GENERIC_IGNORED_FILTER
Filter.GENERIC_IGNORED_FILTER
public ActiveMQServerImpl()
public ActiveMQServerImpl(Configuration configuration)
public ActiveMQServerImpl(Configuration configuration, ActiveMQServer parentServer)
public ActiveMQServerImpl(Configuration configuration, MBeanServer mbeanServer)
public ActiveMQServerImpl(Configuration configuration, ActiveMQSecurityManager securityManager)
public ActiveMQServerImpl(Configuration configuration, MBeanServer mbeanServer, ActiveMQSecurityManager securityManager)
public ActiveMQServerImpl(Configuration configuration, MBeanServer mbeanServer, ActiveMQSecurityManager securityManager, ActiveMQServer parentServer)
public ActiveMQServerImpl(Configuration configuration, MBeanServer mbeanServer, ActiveMQSecurityManager securityManager, ActiveMQServer parentServer, ServiceRegistry serviceRegistry)
public ReloadManager getReloadManager()
getReloadManager
in interface ActiveMQServer
public NetworkHealthCheck getNetworkHealthCheck()
getNetworkHealthCheck
in interface ActiveMQServer
protected NodeManager createNodeManager(File directory, boolean replicatingBackup)
public OperationContext newOperationContext()
newOperationContext
in interface ActiveMQServer
public final void start() throws Exception
start
in interface ActiveMQComponent
Exception
public ReplicationEndpoint getReplicationEndpoint()
getReplicationEndpoint
in interface ActiveMQServer
public void unlockActivation()
ActiveMQServer
unlockActivation
in interface ActiveMQServer
public void lockActivation()
ActiveMQServer
lockActivation
in interface ActiveMQServer
protected final void finalize() throws Throwable
public void setState(org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.SERVER_STATE state)
public org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.SERVER_STATE getState()
public void interruptActivationThread(NodeManager nodeManagerInUse) throws InterruptedException
InterruptedException
public Activation getActivation()
getActivation
in interface ActiveMQServer
public HAPolicy getHAPolicy()
getHAPolicy
in interface ActiveMQServer
public void setHAPolicy(HAPolicy haPolicy)
setHAPolicy
in interface ActiveMQServer
public void setMBeanServer(MBeanServer mbeanServer)
setMBeanServer
in interface ActiveMQServer
public void addExternalComponent(ActiveMQComponent externalComponent)
addExternalComponent
in interface ActiveMQServer
public ExecutorService getThreadPool()
public void setActivation(SharedNothingLiveActivation activation)
public final void stopTheServer(boolean criticalIOError)
public final void stop() throws Exception
stop
in interface ActiveMQComponent
Exception
public void addActivationParam(String key, Object val)
addActivationParam
in interface ActiveMQServer
public boolean isAddressBound(String address) throws Exception
ActiveMQServer
isAddressBound
in interface ActiveMQServer
Exception
public BindingQueryResult bindingQuery(SimpleString address) throws Exception
bindingQuery
in interface ActiveMQServer
Exception
public QueueQueryResult queueQuery(SimpleString name)
queueQuery
in interface ActiveMQServer
public void threadDump()
threadDump
in interface ActiveMQServer
public final void stop(boolean failoverOnServerShutdown) throws Exception
stop
in interface ActiveMQServer
Exception
public QueueCreator getJMSDestinationCreator()
getJMSDestinationCreator
in interface ActiveMQServer
ActiveMQServer.setJMSQueueCreator(QueueCreator)
public void setJMSQueueCreator(QueueCreator jmsQueueCreator)
ActiveMQServer
setJMSQueueCreator
in interface ActiveMQServer
public QueueDeleter getJMSQueueDeleter()
getJMSQueueDeleter
in interface ActiveMQServer
ActiveMQServer.setJMSQueueDeleter(QueueDeleter)
public void setJMSQueueDeleter(QueueDeleter jmsQueueDeleter)
ActiveMQServer
setJMSQueueDeleter
in interface ActiveMQServer
public boolean isReplicaSync()
ActiveMQServer
isReplicaSync
in interface ActiveMQServer
public boolean checkLiveIsNotColocated(String nodeId)
public String describe()
describe
in interface ActiveMQServer
public String destroyConnectionWithSessionMetadata(String metaKey, String parameterValue) throws Exception
destroyConnectionWithSessionMetadata
in interface ActiveMQServer
Exception
public void setIdentity(String identity)
ActiveMQServer
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.
setIdentity
in interface ActiveMQServer
public String getIdentity()
getIdentity
in interface ActiveMQServer
public ScheduledExecutorService getScheduledPool()
getScheduledPool
in interface ActiveMQServer
public Configuration getConfiguration()
getConfiguration
in interface ActiveMQServer
public PagingManager getPagingManager()
getPagingManager
in interface ActiveMQServer
public RemotingService getRemotingService()
getRemotingService
in interface ActiveMQServer
public StorageManager getStorageManager()
getStorageManager
in interface ActiveMQServer
public ActiveMQSecurityManager getSecurityManager()
getSecurityManager
in interface ActiveMQServer
public ManagementService getManagementService()
getManagementService
in interface ActiveMQServer
public HierarchicalRepository<Set<Role>> getSecurityRepository()
getSecurityRepository
in interface ActiveMQServer
public NodeManager getNodeManager()
getNodeManager
in interface ActiveMQServer
public HierarchicalRepository<AddressSettings> getAddressSettingsRepository()
getAddressSettingsRepository
in interface ActiveMQServer
public ResourceManager getResourceManager()
getResourceManager
in interface ActiveMQServer
public Version getVersion()
getVersion
in interface ActiveMQServer
public boolean isStarted()
isStarted
in interface ActiveMQComponent
public ClusterManager getClusterManager()
getClusterManager
in interface ActiveMQServer
public BackupManager getBackupManager()
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) throws Exception
createSession
in interface ActiveMQServer
Exception
public void checkQueueCreationLimit(String username) throws Exception
checkQueueCreationLimit
in interface ActiveMQServer
Exception
public int getQueueCountForUser(String username) throws Exception
Exception
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 autoCreateJMSQueues) throws Exception
Exception
public SecurityStore getSecurityStore()
getSecurityStore
in interface ActiveMQServer
public void removeSession(String name) throws Exception
removeSession
in interface ActiveMQServer
Exception
public ServerSession lookupSession(String key, String value)
lookupSession
in interface ActiveMQServer
public List<ServerSession> getSessions(String connectionID)
getSessions
in interface ActiveMQServer
public Set<ServerSession> getSessions()
getSessions
in interface ActiveMQServer
public boolean isActive()
isActive
in interface ActiveMQServer
public boolean waitForActivation(long timeout, TimeUnit unit) throws InterruptedException
ActiveMQServer
waitForActivation
in interface ActiveMQServer
true
if the server was already initialized or if it was initialized within the
timeout period, false
otherwise.InterruptedException
CountDownLatch.await(long, java.util.concurrent.TimeUnit)
public ActiveMQServerControlImpl getActiveMQServerControl()
ActiveMQServer
getActiveMQServerControl
in interface ActiveMQServer
public int getConnectionCount()
getConnectionCount
in interface ActiveMQServer
public long getTotalConnectionCount()
getTotalConnectionCount
in interface ActiveMQServer
public long getTotalMessageCount()
getTotalMessageCount
in interface ActiveMQServer
public long getTotalMessagesAdded()
getTotalMessagesAdded
in interface ActiveMQServer
public long getTotalMessagesAcknowledged()
getTotalMessagesAcknowledged
in interface ActiveMQServer
public long getTotalConsumerCount()
getTotalConsumerCount
in interface ActiveMQServer
public PostOffice getPostOffice()
getPostOffice
in interface ActiveMQServer
public QueueFactory getQueueFactory()
getQueueFactory
in interface ActiveMQServer
public SimpleString getNodeID()
getNodeID
in interface ActiveMQServer
public Queue createQueue(SimpleString address, SimpleString queueName, SimpleString filterString, boolean durable, boolean temporary) throws Exception
createQueue
in interface ActiveMQServer
Exception
public Queue createQueue(SimpleString address, SimpleString queueName, SimpleString filterString, SimpleString user, boolean durable, boolean temporary) throws Exception
createQueue
in interface ActiveMQServer
Exception
public Queue createQueue(SimpleString address, SimpleString queueName, SimpleString filterString, SimpleString user, boolean durable, boolean temporary, boolean autoCreated) throws Exception
createQueue
in interface ActiveMQServer
Exception
public void createSharedQueue(SimpleString address, SimpleString name, SimpleString filterString, SimpleString user, boolean durable) throws Exception
ActiveMQServer
Notice: the queue won't be deleted until the first consumer arrives.
createSharedQueue
in interface ActiveMQServer
ActiveMQInvalidTransientQueueUseException
- if the shared queue already exists with a different address
or filterString
NullPointerException
- if address
is null
Exception
public Queue locateQueue(SimpleString queueName)
locateQueue
in interface ActiveMQServer
public Queue deployQueue(SimpleString address, SimpleString resourceName, SimpleString filterString, boolean durable, boolean temporary) throws Exception
deployQueue
in interface ActiveMQServer
Exception
public Queue deployQueue(SimpleString address, SimpleString resourceName, SimpleString filterString, boolean durable, boolean temporary, boolean autoCreated) throws Exception
deployQueue
in interface ActiveMQServer
Exception
public void destroyQueue(SimpleString queueName) throws Exception
destroyQueue
in interface ActiveMQServer
Exception
public void destroyQueue(SimpleString queueName, SecurityAuth session) throws Exception
destroyQueue
in interface ActiveMQServer
Exception
public void destroyQueue(SimpleString queueName, SecurityAuth session, boolean checkConsumerCount) throws Exception
destroyQueue
in interface ActiveMQServer
Exception
public void destroyQueue(SimpleString queueName, SecurityAuth session, boolean checkConsumerCount, boolean removeConsumers) throws Exception
destroyQueue
in interface ActiveMQServer
Exception
public void registerActivateCallback(ActivateCallback callback)
registerActivateCallback
in interface ActiveMQServer
public void unregisterActivateCallback(ActivateCallback callback)
unregisterActivateCallback
in interface ActiveMQServer
public void registerActivationFailureListener(ActivationFailureListener listener)
ActiveMQServer
registerActivationFailureListener
in interface ActiveMQServer
listener
- @see org.apache.activemq.artemis.core.server.ActivationFailureListenerpublic void unregisterActivationFailureListener(ActivationFailureListener listener)
ActiveMQServer
unregisterActivationFailureListener
in interface ActiveMQServer
public void callActivationFailureListeners(Exception e)
ActiveMQServer
callActivationFailureListeners
in interface ActiveMQServer
e
- the exception that caused the activation failurepublic void registerPostQueueCreationCallback(PostQueueCreationCallback callback)
registerPostQueueCreationCallback
in interface ActiveMQServer
callback
- PostQueueCreationCallback
public void unregisterPostQueueCreationCallback(PostQueueCreationCallback callback)
unregisterPostQueueCreationCallback
in interface ActiveMQServer
callback
- PostQueueCreationCallback
public void callPostQueueCreationCallbacks(SimpleString queueName) throws Exception
callPostQueueCreationCallbacks
in interface ActiveMQServer
Exception
public void registerPostQueueDeletionCallback(PostQueueDeletionCallback callback)
registerPostQueueDeletionCallback
in interface ActiveMQServer
callback
- PostQueueDeletionCallback
public void unregisterPostQueueDeletionCallback(PostQueueDeletionCallback callback)
unregisterPostQueueDeletionCallback
in interface ActiveMQServer
callback
- PostQueueDeletionCallback
public void callPostQueueDeletionCallbacks(SimpleString address, SimpleString queueName) throws Exception
callPostQueueDeletionCallbacks
in interface ActiveMQServer
Exception
public ExecutorFactory getExecutorFactory()
getExecutorFactory
in interface ActiveMQServer
public ExecutorFactory getIOExecutorFactory()
getIOExecutorFactory
in interface ActiveMQServer
public void setGroupingHandler(GroupingHandler groupingHandler)
setGroupingHandler
in interface ActiveMQServer
public GroupingHandler getGroupingHandler()
getGroupingHandler
in interface ActiveMQServer
public ReplicationManager getReplicationManager()
getReplicationManager
in interface ActiveMQServer
public ConnectorsService getConnectorsService()
getConnectorsService
in interface ActiveMQServer
public void deployDivert(DivertConfiguration config) throws Exception
deployDivert
in interface ActiveMQServer
Exception
public void destroyDivert(SimpleString name) throws Exception
destroyDivert
in interface ActiveMQServer
Exception
public void deployBridge(BridgeConfiguration config) throws Exception
deployBridge
in interface ActiveMQServer
Exception
public void destroyBridge(String name) throws Exception
destroyBridge
in interface ActiveMQServer
Exception
public ServerSession getSessionByID(String sessionName)
getSessionByID
in interface ActiveMQServer
public void replaceQueueFactory(QueueFactory factory)
factory
- protected PagingManager createPagingManager() throws Exception
Exception
protected PagingStoreFactory getPagingStoreFactory() throws Exception
Exception
protected StorageManager createStorageManager()
public ServiceRegistry getServiceRegistry()
getServiceRegistry
in interface ActiveMQServer
public void injectMonitor(FileStoreMonitor storeMonitor) throws Exception
Exception
public FileStoreMonitor getMonitor()
public void checkJournalDirectory()
public void addProtocolManagerFactory(ProtocolManagerFactory factory)
addProtocolManagerFactory
in interface ActiveMQServer
public void removeProtocolManagerFactory(ProtocolManagerFactory factory)
removeProtocolManagerFactory
in interface ActiveMQServer
public ActiveMQServer createBackupServer(Configuration configuration)
createBackupServer
in interface ActiveMQServer
public void addScaledDownNode(SimpleString scaledDownNodeId)
addScaledDownNode
in interface ActiveMQServer
public boolean hasScaledDown(SimpleString scaledDownNodeId)
hasScaledDown
in interface ActiveMQServer
public String getUptime()
getUptime
in interface ActiveMQServer
public long getUptimeMillis()
getUptimeMillis
in interface ActiveMQServer
public boolean addClientConnection(String clientId, boolean unique)
addClientConnection
in interface ActiveMQServer
public void removeClientConnection(String clientId)
removeClientConnection
in interface ActiveMQServer
public IOCriticalErrorListener getCriticalIOErrorListener()
getCriticalIOErrorListener
in interface ActiveMQServer
Copyright © 2017 JBoss by Red Hat. All rights reserved.