org.hornetq.api.jms.management
Interface JMSServerControl


public interface JMSServerControl

A JMSSserverControl is used to manage HornetQ JMS server.

Author:
Jeff Mesnil, Tim Fox

Method Summary
 boolean closeConnectionsForAddress(String ipAddress)
          Closes all the connections of clients connected to this server which matches the specified IP address.
 String closeConnectionWithClientID(String clientID)
          List all the prepared transaction, sorted by date, oldest first, with details, in HTML format
 void createConnectionFactory(String name, boolean ha, boolean useDiscovery, int cfType, String[] connectorNames, Object[] bindings)
          Create a JMS ConnectionFactory with the specified name connected to a static list of live-backup servers.
 void createConnectionFactory(String name, boolean ha, boolean useDiscovery, int cfType, String[] connectors, String[] jndiBindings, String clientID, long clientFailureCheckPeriod, long connectionTTL, long callTimeout, long callFailoverTimeout, int minLargeMessageSize, boolean compressLargeMessages, int consumerWindowSize, int consumerMaxRate, int confirmationWindowSize, int producerWindowSize, int producerMaxRate, boolean blockOnAcknowledge, boolean blockOnDurableSend, boolean blockOnNonDurableSend, boolean autoGroup, boolean preAcknowledge, String loadBalancingPolicyClassName, int transactionBatchSize, int dupsOKBatchSize, boolean useGlobalPools, int scheduledThreadPoolMaxSize, int threadPoolMaxSize, long retryInterval, double retryIntervalMultiplier, long maxRetryInterval, int reconnectAttempts, boolean failoverOnInitialConnection, String groupId)
           
 void createConnectionFactory(String name, boolean ha, boolean useDiscovery, int cfType, String connectors, String jndiBindings)
          Create a JMS ConnectionFactory with the specified name connected to a single live-backup pair of servers.
 void createConnectionFactory(String name, boolean ha, boolean useDiscovery, int cfType, String connectors, String jndiBindings, String clientID, long clientFailureCheckPeriod, long connectionTTL, long callTimeout, long callFailoverTimeout, int minLargeMessageSize, boolean compressLargeMessages, int consumerWindowSize, int consumerMaxRate, int confirmationWindowSize, int producerWindowSize, int producerMaxRate, boolean blockOnAcknowledge, boolean blockOnDurableSend, boolean blockOnNonDurableSend, boolean autoGroup, boolean preAcknowledge, String loadBalancingPolicyClassName, int transactionBatchSize, int dupsOKBatchSize, boolean useGlobalPools, int scheduledThreadPoolMaxSize, int threadPoolMaxSize, long retryInterval, double retryIntervalMultiplier, long maxRetryInterval, int reconnectAttempts, boolean failoverOnInitialConnection, String groupId)
           
 boolean createQueue(String name)
          Creates a durable JMS Queue.
 boolean createQueue(String name, String jndiBindings)
          Creates a durable JMS Queue with the specified name and JNDI binding.
 boolean createQueue(String name, String jndiBindings, String selector)
          Creates a durable JMS Queue with the specified name, JNDI binding and selector.
 boolean createQueue(String name, String jndiBindings, String selector, boolean durable)
          Creates a JMS Queue with the specified name, durability, selector and JNDI binding.
 boolean createTopic(String name)
          Creates a JMS Topic.
 boolean createTopic(String name, String jndiBindings)
          Creates a JMS Topic with the specified name and JNDI binding.
 void destroyConnectionFactory(String name)
           
 boolean destroyQueue(String name)
          Destroys a JMS Queue with the specified name.
 boolean destroyTopic(String name)
          Destroys a JMS Topic with the specified name.
 String[] getConnectionFactoryNames()
          Returns the names of the JMS connection factories available on this server.
 String getLastSentMessageID(String sessionID, String address)
          Returns the last sent message's ID from the given session to an address.
 String[] getQueueNames()
          Returns the names of the JMS queues available on this server.
 String getSessionCreationTime(String sessionID)
          Gets the session's creation time.
 String[] getTopicNames()
          Returns the names of the JMS topics available on this server.
 String getVersion()
          Returns this server's version
 boolean isStarted()
          Returns whether this server is started.
 String listAllConsumersAsJSON()
          Lists all the consumers The returned String is a JSON string containing an array of JMSConsumerInfo objects.
 String[] listConnectionIDs()
          Lists all the IDs of the connections connected to this server.
 String listConnectionsAsJSON()
          Lists all the connections connected to this server.
 String listConsumersAsJSON(String connectionID)
          Lists all the consumers which belongs to the JMS Connection specified by the connectionID.
 String listPreparedTransactionDetailsAsHTML()
          List all the prepared transaction, sorted by date, oldest first, with details, in HTML format
 String listPreparedTransactionDetailsAsJSON()
          List all the prepared transaction, sorted by date, oldest first, with details, in text format
 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.
 String listSessionsAsJSON(String connectionID)
          Lists all the sessions IDs for the specified connection ID.
 String[] listTargetDestinations(String sessionID)
          Lists all addresses to which the designated server session has sent messages.
 

Method Detail

isStarted

boolean isStarted()
Returns whether this server is started.


getVersion

String getVersion()
Returns this server's version


getTopicNames

String[] getTopicNames()
Returns the names of the JMS topics available on this server.


getQueueNames

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


getConnectionFactoryNames

String[] getConnectionFactoryNames()
Returns the names of the JMS connection factories available on this server.


createQueue

boolean createQueue(String name)
                    throws Exception
Creates a durable JMS Queue.

Returns:
true if the queue was created, false else
Throws:
Exception

createQueue

boolean createQueue(String name,
                    String jndiBindings)
                    throws Exception
Creates a durable JMS Queue with the specified name and JNDI binding.

Returns:
true if the queue was created, false else
Throws:
Exception

createQueue

boolean createQueue(String name,
                    String jndiBindings,
                    String selector)
                    throws Exception
Creates a durable JMS Queue with the specified name, JNDI binding and selector.

Returns:
true if the queue was created, false else
Throws:
Exception

createQueue

boolean createQueue(String name,
                    String jndiBindings,
                    String selector,
                    boolean durable)
                    throws Exception
Creates a JMS Queue with the specified name, durability, selector and JNDI binding.

Returns:
true if the queue was created, false else
Throws:
Exception

destroyQueue

boolean destroyQueue(String name)
                     throws Exception
Destroys a JMS Queue with the specified name.

Returns:
true if the queue was destroyed, false else
Throws:
Exception

createTopic

boolean createTopic(String name)
                    throws Exception
Creates a JMS Topic.

Returns:
true if the topic was created, false else
Throws:
Exception

createTopic

boolean createTopic(String name,
                    String jndiBindings)
                    throws Exception
Creates a JMS Topic with the specified name and JNDI binding.

Returns:
true if the topic was created, false else
Throws:
Exception

destroyTopic

boolean destroyTopic(String name)
                     throws Exception
Destroys a JMS Topic with the specified name.

Returns:
true if the topic was destroyed, false else
Throws:
Exception

createConnectionFactory

void createConnectionFactory(String name,
                             boolean ha,
                             boolean useDiscovery,
                             int cfType,
                             String[] connectorNames,
                             Object[] bindings)
                             throws Exception
Create a JMS ConnectionFactory with the specified name connected to a static list of live-backup servers.
The ConnectionFactory is bound to JNDI for all the specified bindings Strings.
liveConnectorsTransportClassNames are the class names of the ConnectorFactory to connect to the live servers and liveConnectorTransportParams are Map<String, Object> for the corresponding TransportConfiguration's parameters.

Throws:
Exception

createConnectionFactory

void createConnectionFactory(String name,
                             boolean ha,
                             boolean useDiscovery,
                             int cfType,
                             String connectors,
                             String jndiBindings)
                             throws Exception
Create a JMS ConnectionFactory with the specified name connected to a single live-backup pair of servers.
The ConnectionFactory is bound to JNDI for all the specified bindings Strings.

Throws:
Exception

createConnectionFactory

void createConnectionFactory(String name,
                             boolean ha,
                             boolean useDiscovery,
                             int cfType,
                             String[] connectors,
                             String[] jndiBindings,
                             String clientID,
                             long clientFailureCheckPeriod,
                             long connectionTTL,
                             long callTimeout,
                             long callFailoverTimeout,
                             int minLargeMessageSize,
                             boolean compressLargeMessages,
                             int consumerWindowSize,
                             int consumerMaxRate,
                             int confirmationWindowSize,
                             int producerWindowSize,
                             int producerMaxRate,
                             boolean blockOnAcknowledge,
                             boolean blockOnDurableSend,
                             boolean blockOnNonDurableSend,
                             boolean autoGroup,
                             boolean preAcknowledge,
                             String loadBalancingPolicyClassName,
                             int transactionBatchSize,
                             int dupsOKBatchSize,
                             boolean useGlobalPools,
                             int scheduledThreadPoolMaxSize,
                             int threadPoolMaxSize,
                             long retryInterval,
                             double retryIntervalMultiplier,
                             long maxRetryInterval,
                             int reconnectAttempts,
                             boolean failoverOnInitialConnection,
                             String groupId)
                             throws Exception
Throws:
Exception

createConnectionFactory

void createConnectionFactory(String name,
                             boolean ha,
                             boolean useDiscovery,
                             int cfType,
                             String connectors,
                             String jndiBindings,
                             String clientID,
                             long clientFailureCheckPeriod,
                             long connectionTTL,
                             long callTimeout,
                             long callFailoverTimeout,
                             int minLargeMessageSize,
                             boolean compressLargeMessages,
                             int consumerWindowSize,
                             int consumerMaxRate,
                             int confirmationWindowSize,
                             int producerWindowSize,
                             int producerMaxRate,
                             boolean blockOnAcknowledge,
                             boolean blockOnDurableSend,
                             boolean blockOnNonDurableSend,
                             boolean autoGroup,
                             boolean preAcknowledge,
                             String loadBalancingPolicyClassName,
                             int transactionBatchSize,
                             int dupsOKBatchSize,
                             boolean useGlobalPools,
                             int scheduledThreadPoolMaxSize,
                             int threadPoolMaxSize,
                             long retryInterval,
                             double retryIntervalMultiplier,
                             long maxRetryInterval,
                             int reconnectAttempts,
                             boolean failoverOnInitialConnection,
                             String groupId)
                             throws Exception
Throws:
Exception

destroyConnectionFactory

void destroyConnectionFactory(String name)
                              throws Exception
Throws:
Exception

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

listConnectionsAsJSON

String listConnectionsAsJSON()
                             throws Exception
Lists all the connections connected to this server. The returned String is a JSON string containing an array of JMSConnectionInfo objects.

Throws:
Exception
See Also:
JMSConnectionInfo.from(String)

listSessions

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

Throws:
Exception

listConsumersAsJSON

String listConsumersAsJSON(String connectionID)
                           throws Exception
Lists all the consumers which belongs to the JMS Connection specified by the connectionID. The returned String is a JSON string containing an array of JMSConsumerInfo objects.

Throws:
Exception
See Also:
JMSConsumerInfo.from(String)

listAllConsumersAsJSON

String listAllConsumersAsJSON()
                              throws Exception
Lists all the consumers The returned String is a JSON string containing an array of JMSConsumerInfo objects.

Throws:
Exception
See Also:
JMSConsumerInfo.from(String)

listTargetDestinations

String[] listTargetDestinations(String sessionID)
                                throws Exception
Lists all addresses to which the designated server session has sent messages.

Throws:
Exception

getLastSentMessageID

String getLastSentMessageID(String sessionID,
                            String address)
                            throws Exception
Returns the last sent message's ID from the given session to an address.

Throws:
Exception

getSessionCreationTime

String getSessionCreationTime(String sessionID)
                              throws Exception
Gets the session's creation time.

Throws:
Exception

listSessionsAsJSON

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

Throws:
Exception

listPreparedTransactionDetailsAsJSON

String listPreparedTransactionDetailsAsJSON()
                                            throws Exception
List all the prepared transaction, sorted by date, oldest first, with details, in text format

Throws:
Exception

listPreparedTransactionDetailsAsHTML

String listPreparedTransactionDetailsAsHTML()
                                            throws Exception
List all the prepared transaction, sorted by date, oldest first, with details, in HTML format

Throws:
Exception

closeConnectionWithClientID

String closeConnectionWithClientID(String clientID)
                                   throws Exception
List all the prepared transaction, sorted by date, oldest first, with details, in HTML format

Throws:
Exception


Copyright © 2013 JBoss, a division of Red Hat. All Rights Reserved.