public interface ActiveMQServer extends ServiceComponent
This is not part of our public API.
Modifier and Type | Interface and Description |
---|---|
static class |
ActiveMQServer.SERVER_STATE |
stop
isStarted, start, stop
void setState(ActiveMQServer.SERVER_STATE state)
ActiveMQServer.SERVER_STATE getState()
void setIdentity(String 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.
String getIdentity()
String describe()
Configuration getConfiguration()
ServiceRegistry getServiceRegistry()
RemotingService getRemotingService()
StorageManager getStorageManager()
PagingManager getPagingManager()
PagingManager createPagingManager() throws Exception
Exception
ManagementService getManagementService()
ActiveMQSecurityManager getSecurityManager()
NetworkHealthCheck getNetworkHealthCheck()
Version getVersion()
NodeManager getNodeManager()
CriticalAnalyzer getCriticalAnalyzer()
ReplicationEndpoint getReplicationEndpoint()
void unlockActivation()
void lockActivation()
ActiveMQServerControlImpl getActiveMQServerControl()
IllegalStateException
- if the server is not properly started.void destroyQueue(SimpleString queueName, SecurityAuth session, boolean checkConsumerCount, boolean removeConsumers, boolean autoDeleteAddress) throws Exception
Exception
void registerActivateCallback(ActivateCallback callback)
void unregisterActivateCallback(ActivateCallback callback)
void registerActivationFailureListener(ActivationFailureListener listener)
listener
- @see org.apache.activemq.artemis.core.server.ActivationFailureListenervoid unregisterActivationFailureListener(ActivationFailureListener listener)
listener
- void callActivationFailureListeners(Exception e)
e
- the exception that caused the activation failurevoid registerPostQueueCreationCallback(PostQueueCreationCallback callback)
callback
- PostQueueCreationCallback
void unregisterPostQueueCreationCallback(PostQueueCreationCallback callback)
callback
- PostQueueCreationCallback
void callPostQueueCreationCallbacks(SimpleString queueName) throws Exception
queueName
- Exception
void registerPostQueueDeletionCallback(PostQueueDeletionCallback callback)
callback
- PostQueueDeletionCallback
void unregisterPostQueueDeletionCallback(PostQueueDeletionCallback callback)
callback
- PostQueueDeletionCallback
void callPostQueueDeletionCallbacks(SimpleString address, SimpleString queueName) throws Exception
queueName
- Exception
void registerBrokerPlugin(ActiveMQServerPlugin plugin)
void unRegisterBrokerPlugin(ActiveMQServerPlugin plugin)
void registerBrokerPlugins(List<ActiveMQServerPlugin> plugins)
List<ActiveMQServerPlugin> getBrokerPlugins()
void callBrokerPlugins(ActiveMQPluginRunnable pluginRun) throws ActiveMQException
ActiveMQException
boolean hasBrokerPlugins()
void checkQueueCreationLimit(String username) throws Exception
Exception
ServerSession createSession(String name, String username, String password, int minLargeMessageSize, RemotingConnection remotingConnection, boolean autoCommitSends, boolean autoCommitAcks, boolean preAcknowledge, boolean xa, String defaultAddress, SessionCallback callback, boolean autoCreateQueues, OperationContext context, Map<SimpleString,RoutingType> prefixes) throws Exception
Exception
SecurityStore getSecurityStore()
Set<ServerSession> getSessions()
HierarchicalRepository<Set<Role>> getSecurityRepository()
HierarchicalRepository<AddressSettings> getAddressSettingsRepository()
OperationContext newOperationContext()
int getConnectionCount()
long getTotalConnectionCount()
long getTotalMessageCount()
long getTotalMessagesAdded()
long getTotalMessagesAcknowledged()
long getTotalConsumerCount()
PostOffice getPostOffice()
QueueFactory getQueueFactory()
ResourceManager getResourceManager()
List<ServerSession> getSessions(String connectionID)
ServerSession lookupSession(String metakey, String metavalue)
ClusterManager getClusterManager()
SimpleString getNodeID()
boolean isActive()
String getUptime()
long getUptimeMillis()
boolean isReplicaSync()
boolean waitForActivation(long timeout, TimeUnit unit) throws InterruptedException
timeout
- unit
- 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)
void createSharedQueue(SimpleString address, RoutingType routingType, SimpleString name, SimpleString filterString, SimpleString user, boolean durable) throws Exception
Notice: the queue won't be deleted until the first consumer arrives.
address
- name
- filterString
- durable
- ActiveMQInvalidTransientQueueUseException
- if the shared queue already exists with a different address
or filterString
NullPointerException
- if address
is null
Exception
void createSharedQueue(SimpleString address, RoutingType routingType, SimpleString name, SimpleString filterString, SimpleString user, boolean durable, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean lastValue) throws Exception
Exception
Queue createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, boolean durable, boolean temporary) throws Exception
Exception
Queue createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString user, SimpleString filterString, boolean durable, boolean temporary) throws Exception
Exception
Queue createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, boolean durable, boolean temporary, int maxConsumers, boolean purgeOnNoConsumers, boolean autoCreateAddress) throws Exception
Exception
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
Exception
Queue createQueue(AddressInfo addressInfo, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean autoCreated, Integer maxConsumers, Boolean purgeOnNoConsumers, boolean autoCreateAddress) throws Exception
Exception
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
Exception
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
Exception
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
Exception
@Deprecated Queue createQueue(SimpleString address, SimpleString queueName, SimpleString filter, boolean durable, boolean temporary) throws Exception
Exception
@Deprecated Queue deployQueue(String address, String queue, String filter, boolean durable, boolean temporary) throws Exception
Exception
@Deprecated Queue deployQueue(SimpleString address, SimpleString queue, SimpleString filter, boolean durable, boolean temporary) throws Exception
Exception
Queue locateQueue(SimpleString queueName)
BindingQueryResult bindingQuery(SimpleString address) throws Exception
Exception
QueueQueryResult queueQuery(SimpleString name) throws Exception
Exception
AddressQueryResult addressQuery(SimpleString name) throws Exception
Exception
void destroyQueue(SimpleString queueName) throws Exception
Exception
void destroyQueue(SimpleString queueName, SecurityAuth session) throws Exception
Exception
void destroyQueue(SimpleString queueName, SecurityAuth session, boolean checkConsumerCount) throws Exception
Exception
void destroyQueue(SimpleString queueName, SecurityAuth session, boolean checkConsumerCount, boolean removeConsumers) throws Exception
Exception
String destroyConnectionWithSessionMetadata(String metaKey, String metaValue) throws Exception
Exception
ScheduledExecutorService getScheduledPool()
ExecutorFactory getExecutorFactory()
ExecutorFactory getIOExecutorFactory()
void setGroupingHandler(GroupingHandler groupingHandler)
GroupingHandler getGroupingHandler()
ReplicationManager getReplicationManager()
void deployDivert(DivertConfiguration config) throws Exception
Exception
void destroyDivert(SimpleString name) throws Exception
Exception
ConnectorsService getConnectorsService()
void deployBridge(BridgeConfiguration config) throws Exception
Exception
ServerSession getSessionByID(String sessionID)
void threadDump()
boolean isAddressBound(String address) throws Exception
address
- Exception
Queue updateQueue(String name, RoutingType routingType, Integer maxConsumers, Boolean purgeOnNoConsumers) throws Exception
Exception
Queue updateQueue(String name, RoutingType routingType, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive) throws Exception
Exception
void addProtocolManagerFactory(ProtocolManagerFactory factory)
void removeProtocolManagerFactory(ProtocolManagerFactory factory)
ReloadManager getReloadManager()
ActiveMQServer createBackupServer(Configuration configuration)
void addScaledDownNode(SimpleString scaledDownNodeId)
boolean hasScaledDown(SimpleString scaledDownNodeId)
Activation getActivation()
HAPolicy getHAPolicy()
void setHAPolicy(HAPolicy haPolicy)
void setMBeanServer(MBeanServer mBeanServer)
void addExternalComponent(ActiveMQComponent externalComponent)
List<ActiveMQComponent> getExternalComponents()
boolean addClientConnection(String clientId, boolean unique)
void removeClientConnection(String clientId)
Executor getThreadPool()
AddressInfo getAddressInfo(SimpleString address)
boolean updateAddressInfo(SimpleString address, EnumSet<RoutingType> routingTypes) throws Exception
AddressInfo
on the broker with the specified routing types.address
- the name of the AddressInfo
to updateroutingTypes
- the routing types to update the AddressInfo
withtrue
if the AddressInfo
was updated, false
otherwiseException
@Deprecated boolean updateAddressInfo(SimpleString address, Collection<RoutingType> routingTypes) throws Exception
Exception
boolean addAddressInfo(AddressInfo addressInfo) throws Exception
AddressInfo
to the brokeraddressInfo
- the AddressInfo
to addtrue
if the AddressInfo
was added, false
otherwiseException
AddressInfo addOrUpdateAddressInfo(AddressInfo addressInfo) throws Exception
addAddressInfo
and updateAddressInfo
. It will
add the AddressInfo
object to the broker if it doesn't exist or update it if it does.addressInfo
- the AddressInfo
to add or the info used to update the existing AddressInfo
AddressInfo
Exception
void removeAddressInfo(SimpleString address, SecurityAuth auth) throws Exception
AddressInfo
from the broker.address
- the AddressInfo
to removeauth
- authorization information; null
is validException
void removeAddressInfo(SimpleString address, SecurityAuth auth, boolean force) throws Exception
AddressInfo
from the broker.address
- the AddressInfo
to removeauth
- authorization information; null
is validforce
- It will disconnect everything from the address including queues and consumersException
String getInternalNamingPrefix()
Copyright © 2018 JBoss by Red Hat. All rights reserved.