org.hornetq.api.core.management
Interface HornetQServerControl


public interface HornetQServerControl

A HornetQServerControl is used to manage HornetQ servers.


Method Summary
 void addAddressSettings(String addressMatch, String DLA, String expiryAddress, boolean lastValueQueue, int deliveryAttempts, long maxSizeBytes, int pageSizeBytes, long redeliveryDelay, long redistributionDelay, boolean sendToDLAOnNoRoute, String addressFullMessagePolicy)
          adds a new address setting for a specific address
 void addSecuritySettings(String addressMatch, String sendRoles, String consumeRoles, String createDurableQueueRoles, String deleteDurableQueueRoles, String createNonDurableQueueRoles, String deleteNonDurableQueueRoles, String manageRoles)
           
 boolean closeConnectionsForAddress(String ipAddress)
          Closes all the connections of clients connected to this server which matches the specified IP address.
 boolean commitPreparedTransaction(String transactionAsBase64)
          Heuristically commits a prepared transaction.
 void createBridge(String name, String queueName, String forwardingAddress, String filterString, String transformerClassName, long retryInterval, double retryIntervalMultiplier, int reconnectAttempts, boolean failoverOnServerShutdown, boolean useDuplicateDetection, int confirmationWindowSize, long clientFailureCheckPeriod, String discoveryGroupName, String user, String password)
           
 void createBridge(String name, String queueName, String forwardingAddress, String filterString, String transformerClassName, long retryInterval, double retryIntervalMultiplier, int reconnectAttempts, boolean failoverOnServerShutdown, boolean useDuplicateDetection, int confirmationWindowSize, long clientFailureCheckPeriod, String liveConnector, String backupConnector, String user, String password)
           
 void createDivert(String name, String routingName, String address, String forwardingAddress, boolean exclusive, String filterString, String transformerClassName)
           
 void createQueue(String address, String name)
          Create a durable queue.
 void createQueue(String address, String name, boolean durable)
          Create a queue.
 void createQueue(String address, String name, String filter, boolean durable)
          Create a queue.
 void deployQueue(String address, String name, String filter)
          Deploy a durable queue.
 void deployQueue(String address, String name, String filter, boolean durable)
          Deploy a queue.
 void destroyBridge(String name)
           
 void destroyDivert(String name)
           
 void destroyQueue(String name)
          Destroys the queue corresponding to the specified name.
 void disableMessageCounters()
          Disables message counters for this server.
 void enableMessageCounters()
          Enables message counters for this server.
 String[] getAddressNames()
          Returns the addresses created on this server.
 String getAddressSettingsAsJSON(String addressMatch)
          returns the address settings as a JSON string
 String getBackupConnectorName()
          Returns the name of the connector used to connect to the backup.
 String getBindingsDirectory()
          Returns the file system directory used to store bindings.
 String[] getBridgeNames()
           
 int getConnectionCount()
          Returns the number of connections connected to this server.
 long getConnectionTTLOverride()
          Returns the connection time to live.
 Object[] getConnectors()
          Returns the connectors configured for this server.
 String getConnectorsAsJSON()
          Returns the connectors configured for this server using JSON serialization.
 String[] getDivertNames()
           
 int getIDCacheSize()
          Returns the size of the cache for pre-creating message IDs.
 String[] getInterceptorClassNames()
          Returns the list of interceptors used by this server.
 int getJournalBufferSize()
          Returns the size of the internal buffer on the journal.
 int getJournalBufferTimeout()
          Returns the timeout (in nanoseconds) used to flush internal buffers on the journal.
 int getJournalCompactMinFiles()
          Returns the minimal number of journal files before compacting.
 int getJournalCompactPercentage()
          Return the percentage of live data before compacting the journal.
 String getJournalDirectory()
          Returns the file system directory used to store journal log.
 int getJournalFileSize()
          Returns the size (in bytes) of each journal files.
 int getJournalMaxIO()
          Returns the maximum number of write requests that can be in the AIO queue at any given time.
 int getJournalMinFiles()
          Returns the number of journal files to pre-create.
 String getJournalType()
          Returns the type of journal used by this server (either NIO or ASYNCIO).
 String getLargeMessagesDirectory()
          Returns the file system directory used to store large messages.
 String getManagementAddress()
          Returns the management address of this server.
 String getManagementNotificationAddress()
          Returns the management notification address of this server.
 int getMessageCounterMaxDayCount()
          Returns the maximum number of days kept in memory for message counter.
 long getMessageCounterSamplePeriod()
          Returns the sample period (in milliseconds) to take message counter snapshot.
 long getMessageExpiryScanPeriod()
          Returns the frequency (in milliseconds) to scan messages to detect which messages have expired.
 long getMessageExpiryThreadPriority()
          Returns the priority of the thread used to scan message expiration.
 String getPagingDirectory()
          Returns the file system directory used to store paging files.
 String[] getQueueNames()
          Returns the names of the queues created on this server.
 Object[] getRoles(String addressMatch)
           
 String getRolesAsJSON(String addressMatch)
           
 int getScheduledThreadPoolMaxSize()
          Returns the maximum number of threads in the scheduled thread pool.
 long getSecurityInvalidationInterval()
          Returns the interval time (in milliseconds) to invalidate security credentials.
 int getThreadPoolMaxSize()
          Returns the maximum number of threads in the thread pool.
 long getTransactionTimeout()
          Returns the timeout (in milliseconds) after which transactions is removed from the resource manager after it was created.
 long getTransactionTimeoutScanPeriod()
          Returns the frequency (in milliseconds) to scan transactions to detect which transactions have timed out.
 String getVersion()
          Returns this server's version.
 boolean isAsyncConnectionExecutionEnabled()
          Returns whether code coming from connection is executed asynchronously or not.
 boolean isBackup()
          Returns true if this server is a backup, false if it is a live server.
 boolean isClustered()
          Returns whether this server is clustered.
 boolean isCreateBindingsDir()
          Returns whether the bindings directory is created on this server startup.
 boolean isCreateJournalDir()
          Returns whether the journal directory is created on this server startup.
 boolean isJournalSyncNonTransactional()
          Returns whether the journal is synchronized when receiving non-transactional data.
 boolean isJournalSyncTransactional()
          Returns whether the journal is synchronized when receiving transactional data.
 boolean isMessageCounterEnabled()
          Returns whether message counter is enabled for this server.
 boolean isPersistDeliveryCountBeforeDelivery()
          Returns whether delivery count is persisted before messages are delivered to the consumers.
 boolean isPersistenceEnabled()
          Returns whether this server is using persistence and store data.
 boolean isPersistIDCache()
          Returns whether message ID cache is persisted.
 boolean isSecurityEnabled()
          Returns whether security is enabled for this server.
 boolean isSharedStore()
          Returns whether this server shares its data store with a corresponding live or backup server.
 boolean isStarted()
          Return whether this server is started.
 boolean isWildcardRoutingEnabled()
          Returns whether wildcard routing is supported by this server.
 String[] listConnectionIDs()
          Lists all the IDs of the connections connected to this server.
 String[] listHeuristicCommittedTransactions()
          List transactions which have been heuristically committed.
 String[] listHeuristicRolledBackTransactions()
          List transactions which have been heuristically rolled back.
 String[] listPreparedTransactions()
          List all the prepared transaction, sorted by date, oldest first.
 String[] listRemoteAddresses()
          Lists the addresses of all the clients connected to this address.
 String[] listRemoteAddresses(String ipAddress)
          Lists the addresses of the clients connected to this address which matches the specified IP address.
 String[] listSessions(String connectionID)
          Lists all the sessions IDs for the specified connection ID.
 void removeAddressSettings(String addressMatch)
           
 void removeSecuritySettings(String addressMatch)
           
 void resetAllMessageCounterHistories()
          Reset histories for all message counters.
 void resetAllMessageCounters()
          Reset all message counters.
 boolean rollbackPreparedTransaction(String transactionAsBase64)
          Heuristically rolls back a prepared transaction.
 void sendQueueInfoToQueue(String queueName, String address)
          This method is used by HornetQ clustering and must not be called by HornetQ clients.
 void setMessageCounterMaxDayCount(int count)
          Sets the maximum number of days kept in memory for message counter.
 void setMessageCounterSamplePeriod(long newPeriod)
          Sets the sample period to take message counter snapshot.
 

Method Detail

getBackupConnectorName

String getBackupConnectorName()
Returns the name of the connector used to connect to the backup.
If this server has no backup or is itself a backup, the value is null.


getVersion

String getVersion()
Returns this server's version.


getConnectionCount

int getConnectionCount()
Returns the number of connections connected to this server.


isStarted

boolean isStarted()
Return whether this server is started.


getInterceptorClassNames

String[] getInterceptorClassNames()
Returns the list of interceptors used by this server.

See Also:
Interceptor

isClustered

boolean isClustered()
Returns whether this server is clustered.


getScheduledThreadPoolMaxSize

int getScheduledThreadPoolMaxSize()
Returns the maximum number of threads in the scheduled thread pool.


getThreadPoolMaxSize

int getThreadPoolMaxSize()
Returns the maximum number of threads in the thread pool.


getSecurityInvalidationInterval

long getSecurityInvalidationInterval()
Returns the interval time (in milliseconds) to invalidate security credentials.


isSecurityEnabled

boolean isSecurityEnabled()
Returns whether security is enabled for this server.


getBindingsDirectory

String getBindingsDirectory()
Returns the file system directory used to store bindings.


getJournalDirectory

String getJournalDirectory()
Returns the file system directory used to store journal log.


getJournalType

String getJournalType()
Returns the type of journal used by this server (either NIO or ASYNCIO).


isJournalSyncTransactional

boolean isJournalSyncTransactional()
Returns whether the journal is synchronized when receiving transactional data.


isJournalSyncNonTransactional

boolean isJournalSyncNonTransactional()
Returns whether the journal is synchronized when receiving non-transactional data.


getJournalFileSize

int getJournalFileSize()
Returns the size (in bytes) of each journal files.


getJournalMinFiles

int getJournalMinFiles()
Returns the number of journal files to pre-create.


getJournalMaxIO

int getJournalMaxIO()
Returns the maximum number of write requests that can be in the AIO queue at any given time.


getJournalBufferSize

int getJournalBufferSize()
Returns the size of the internal buffer on the journal.


getJournalBufferTimeout

int getJournalBufferTimeout()
Returns the timeout (in nanoseconds) used to flush internal buffers on the journal.


getJournalCompactMinFiles

int getJournalCompactMinFiles()
Returns the minimal number of journal files before compacting.


getJournalCompactPercentage

int getJournalCompactPercentage()
Return the percentage of live data before compacting the journal.


isPersistenceEnabled

boolean isPersistenceEnabled()
Returns whether this server is using persistence and store data.


isCreateBindingsDir

boolean isCreateBindingsDir()
Returns whether the bindings directory is created on this server startup.


isCreateJournalDir

boolean isCreateJournalDir()
Returns whether the journal directory is created on this server startup.


isMessageCounterEnabled

boolean isMessageCounterEnabled()
Returns whether message counter is enabled for this server.


getMessageCounterMaxDayCount

int getMessageCounterMaxDayCount()
Returns the maximum number of days kept in memory for message counter.


setMessageCounterMaxDayCount

void setMessageCounterMaxDayCount(int count)
                                  throws Exception
Sets the maximum number of days kept in memory for message counter.

Parameters:
count - value must be greater than 0
Throws:
Exception

getMessageCounterSamplePeriod

long getMessageCounterSamplePeriod()
Returns the sample period (in milliseconds) to take message counter snapshot.


setMessageCounterSamplePeriod

void setMessageCounterSamplePeriod(long newPeriod)
                                   throws Exception
Sets the sample period to take message counter snapshot.

Parameters:
newPeriod - value must be greater than 1000ms
Throws:
Exception

isBackup

boolean isBackup()
Returns true if this server is a backup, false if it is a live server.
If a backup server has been activated, returns false.


isSharedStore

boolean isSharedStore()
Returns whether this server shares its data store with a corresponding live or backup server.


getPagingDirectory

String getPagingDirectory()
Returns the file system directory used to store paging files.


isPersistDeliveryCountBeforeDelivery

boolean isPersistDeliveryCountBeforeDelivery()
Returns whether delivery count is persisted before messages are delivered to the consumers.


getConnectionTTLOverride

long getConnectionTTLOverride()
Returns the connection time to live.
This value overrides the connection time to live sent by the client.


getManagementAddress

String getManagementAddress()
Returns the management address of this server.
Clients can send management messages to this address to manage this server.


getManagementNotificationAddress

String getManagementNotificationAddress()
Returns the management notification address of this server.
Clients can bind queues to this address to receive management notifications emitted by this server.


getIDCacheSize

int getIDCacheSize()
Returns the size of the cache for pre-creating message IDs.


isPersistIDCache

boolean isPersistIDCache()
Returns whether message ID cache is persisted.


getLargeMessagesDirectory

String getLargeMessagesDirectory()
Returns the file system directory used to store large messages.


isWildcardRoutingEnabled

boolean isWildcardRoutingEnabled()
Returns whether wildcard routing is supported by this server.


getTransactionTimeout

long getTransactionTimeout()
Returns the timeout (in milliseconds) after which transactions is removed from the resource manager after it was created.


getTransactionTimeoutScanPeriod

long getTransactionTimeoutScanPeriod()
Returns the frequency (in milliseconds) to scan transactions to detect which transactions have timed out.


getMessageExpiryScanPeriod

long getMessageExpiryScanPeriod()
Returns the frequency (in milliseconds) to scan messages to detect which messages have expired.


getMessageExpiryThreadPriority

long getMessageExpiryThreadPriority()
Returns the priority of the thread used to scan message expiration.


isAsyncConnectionExecutionEnabled

boolean isAsyncConnectionExecutionEnabled()
Returns whether code coming from connection is executed asynchronously or not.


getConnectors

Object[] getConnectors()
                       throws Exception
Returns the connectors configured for this server.

Throws:
Exception

getConnectorsAsJSON

String getConnectorsAsJSON()
                           throws Exception
Returns the connectors configured for this server using JSON serialization.

Throws:
Exception

getAddressNames

String[] getAddressNames()
Returns the addresses created on this server.


getQueueNames

String[] getQueueNames()
Returns the names of the queues created on this server.


createQueue

void createQueue(String address,
                 String name)
                 throws Exception
Create a durable queue.
This method throws a HornetQException.QUEUE_EXISTS) exception if the queue already exits.

Parameters:
address - address to bind the queue to
name - name of the queue
Throws:
Exception

createQueue

void createQueue(String address,
                 String name,
                 String filter,
                 boolean durable)
                 throws Exception
Create a queue.
This method throws a HornetQException.QUEUE_EXISTS) exception if the queue already exits.

Parameters:
address - address to bind the queue to
name - name of the queue
filter - of the queue
durable - whether the queue is durable
Throws:
Exception

createQueue

void createQueue(String address,
                 String name,
                 boolean durable)
                 throws Exception
Create a queue.
This method throws a HornetQException.QUEUE_EXISTS) exception if the queue already exits.

Parameters:
address - address to bind the queue to
name - name of the queue
durable - whether the queue is durable
Throws:
Exception

deployQueue

void deployQueue(String address,
                 String name,
                 String filter)
                 throws Exception
Deploy a durable queue.
This method will do nothing if the queue with the given name already exists on the server.

Parameters:
address - address to bind the queue to
name - name of the queue
filter - of the queue
Throws:
Exception

deployQueue

void deployQueue(String address,
                 String name,
                 String filter,
                 boolean durable)
                 throws Exception
Deploy a queue.
This method will do nothing if the queue with the given name already exists on the server.

Parameters:
address - address to bind the queue to
name - name of the queue
filter - of the queue
durable - whether the queue is durable
Throws:
Exception

destroyQueue

void destroyQueue(String name)
                  throws Exception
Destroys the queue corresponding to the specified name.

Throws:
Exception

enableMessageCounters

void enableMessageCounters()
                           throws Exception
Enables message counters for this server.

Throws:
Exception

disableMessageCounters

void disableMessageCounters()
                            throws Exception
Disables message counters for this server.

Throws:
Exception

resetAllMessageCounters

void resetAllMessageCounters()
                             throws Exception
Reset all message counters.

Throws:
Exception

resetAllMessageCounterHistories

void resetAllMessageCounterHistories()
                                     throws Exception
Reset histories for all message counters.

Throws:
Exception

listPreparedTransactions

String[] listPreparedTransactions()
                                  throws Exception
List all the prepared transaction, sorted by date, oldest first.
The Strings are Base-64 representation of the transaction XID and can be used to heuristically commit or rollback the transactions.

Throws:
Exception
See Also:
commitPreparedTransaction(String), rollbackPreparedTransaction(String)

listHeuristicCommittedTransactions

String[] listHeuristicCommittedTransactions()
                                            throws Exception
List transactions which have been heuristically committed.

Throws:
Exception

listHeuristicRolledBackTransactions

String[] listHeuristicRolledBackTransactions()
                                             throws Exception
List transactions which have been heuristically rolled back.

Throws:
Exception

commitPreparedTransaction

boolean commitPreparedTransaction(String transactionAsBase64)
                                  throws Exception
Heuristically commits a prepared transaction.

Parameters:
transactionAsBase64 - base 64 representation of a prepare transaction
Returns:
true if the transaction was successfully committed, false else
Throws:
Exception
See Also:
listPreparedTransactions()

rollbackPreparedTransaction

boolean rollbackPreparedTransaction(String transactionAsBase64)
                                    throws Exception
Heuristically rolls back a prepared transaction.

Parameters:
transactionAsBase64 - base 64 representation of a prepare transaction
Returns:
true if the transaction was successfully rolled back, false else
Throws:
Exception
See Also:
listPreparedTransactions()

listRemoteAddresses

String[] listRemoteAddresses()
                             throws Exception
Lists the addresses of all the clients connected to this address.

Throws:
Exception

listRemoteAddresses

String[] listRemoteAddresses(String ipAddress)
                             throws Exception
Lists the addresses of the clients connected to this address which matches the specified IP address.

Throws:
Exception

closeConnectionsForAddress

boolean closeConnectionsForAddress(String ipAddress)
                                   throws Exception
Closes all the connections of clients connected to this server which matches the specified IP address.

Throws:
Exception

listConnectionIDs

String[] listConnectionIDs()
                           throws Exception
Lists all the IDs of the connections connected to this server.

Throws:
Exception

listSessions

String[] listSessions(String connectionID)
                      throws Exception
Lists all the sessions IDs for the specified connection ID.

Throws:
Exception

sendQueueInfoToQueue

void sendQueueInfoToQueue(String queueName,
                          String address)
                          throws Exception
This method is used by HornetQ clustering and must not be called by HornetQ clients.

Throws:
Exception

addSecuritySettings

void addSecuritySettings(String addressMatch,
                         String sendRoles,
                         String consumeRoles,
                         String createDurableQueueRoles,
                         String deleteDurableQueueRoles,
                         String createNonDurableQueueRoles,
                         String deleteNonDurableQueueRoles,
                         String manageRoles)
                         throws Exception
Throws:
Exception

removeSecuritySettings

void removeSecuritySettings(String addressMatch)
                            throws Exception
Throws:
Exception

getRoles

Object[] getRoles(String addressMatch)
                  throws Exception
Throws:
Exception

getRolesAsJSON

String getRolesAsJSON(String addressMatch)
                      throws Exception
Throws:
Exception

addAddressSettings

void addAddressSettings(String addressMatch,
                        String DLA,
                        String expiryAddress,
                        boolean lastValueQueue,
                        int deliveryAttempts,
                        long maxSizeBytes,
                        int pageSizeBytes,
                        long redeliveryDelay,
                        long redistributionDelay,
                        boolean sendToDLAOnNoRoute,
                        String addressFullMessagePolicy)
                        throws Exception
adds a new address setting for a specific address

Throws:
Exception

removeAddressSettings

void removeAddressSettings(String addressMatch)
                           throws Exception
Throws:
Exception

getAddressSettingsAsJSON

String getAddressSettingsAsJSON(String addressMatch)
                                throws Exception
returns the address settings as a JSON string

Throws:
Exception

getDivertNames

String[] getDivertNames()

createDivert

void createDivert(String name,
                  String routingName,
                  String address,
                  String forwardingAddress,
                  boolean exclusive,
                  String filterString,
                  String transformerClassName)
                  throws Exception
Throws:
Exception

destroyDivert

void destroyDivert(String name)
                   throws Exception
Throws:
Exception

getBridgeNames

String[] getBridgeNames()

createBridge

void createBridge(String name,
                  String queueName,
                  String forwardingAddress,
                  String filterString,
                  String transformerClassName,
                  long retryInterval,
                  double retryIntervalMultiplier,
                  int reconnectAttempts,
                  boolean failoverOnServerShutdown,
                  boolean useDuplicateDetection,
                  int confirmationWindowSize,
                  long clientFailureCheckPeriod,
                  String liveConnector,
                  String backupConnector,
                  String user,
                  String password)
                  throws Exception
Throws:
Exception

createBridge

void createBridge(String name,
                  String queueName,
                  String forwardingAddress,
                  String filterString,
                  String transformerClassName,
                  long retryInterval,
                  double retryIntervalMultiplier,
                  int reconnectAttempts,
                  boolean failoverOnServerShutdown,
                  boolean useDuplicateDetection,
                  int confirmationWindowSize,
                  long clientFailureCheckPeriod,
                  String discoveryGroupName,
                  String user,
                  String password)
                  throws Exception
Throws:
Exception

destroyBridge

void destroyBridge(String name)
                   throws Exception
Throws:
Exception


Copyright © 2009 Red Hat Inc. All Rights Reserved.