org.jboss.messaging.jms.server.impl
Class JMSServerManagerImpl

java.lang.Object
  extended by org.jboss.messaging.jms.server.impl.JMSServerManagerImpl
All Implemented Interfaces:
ActivateCallback, MessagingComponent, JMSServerManager

public class JMSServerManagerImpl
extends java.lang.Object
implements JMSServerManager, ActivateCallback

A Deployer used to create and add to JNDI queues, topics and connection factories. Typically this would only be used in an app server env.

Author:
Andy Taylor, Jeff Mesnil, Tim Fox

Constructor Summary
JMSServerManagerImpl(MessagingServer server)
           
JMSServerManagerImpl(MessagingServer server, java.lang.String configFileName)
           
 
Method Summary
 void activated()
           
 boolean closeConnectionsForAddress(java.lang.String ipAddress)
           
 void createConnectionFactory(java.lang.String name, java.util.List<Pair<TransportConfiguration,TransportConfiguration>> connectorConfigs, java.util.List<java.lang.String> jndiBindings)
           
 void createConnectionFactory(java.lang.String name, java.util.List<Pair<TransportConfiguration,TransportConfiguration>> connectorConfigs, java.lang.String clientID, java.util.List<java.lang.String> jndiBindings)
           
 void createConnectionFactory(java.lang.String name, java.util.List<Pair<TransportConfiguration,TransportConfiguration>> connectorConfigs, java.lang.String clientID, long clientFailureCheckPeriod, long connectionTTL, long callTimeout, int maxConnections, int minLargeMessageSize, int consumerWindowSize, int consumerMaxRate, int producerWindowSize, int producerMaxRate, boolean blockOnAcknowledge, boolean blockOnPersistentSend, boolean blockOnNonPersistentSend, boolean autoGroup, boolean preAcknowledge, java.lang.String loadBalancingPolicyClassName, int transactionBatchSize, int dupsOKBatchSize, boolean useGlobalPools, int scheduledThreadPoolMaxSize, int threadPoolMaxSize, long retryInterval, double retryIntervalMultiplier, int reconnectAttempts, boolean failoverOnServerShutdown, java.util.List<java.lang.String> jndiBindings)
           
 void createConnectionFactory(java.lang.String name, java.lang.String discoveryAddress, int discoveryPort, java.util.List<java.lang.String> jndiBindings)
           
 void createConnectionFactory(java.lang.String name, java.lang.String discoveryAddress, int discoveryPort, java.lang.String clientID, java.util.List<java.lang.String> jndiBindings)
           
 void createConnectionFactory(java.lang.String name, java.lang.String discoveryAddress, int discoveryPort, java.lang.String clientID, long discoveryRefreshTimeout, long clientFailureCheckPeriod, long connectionTTL, long callTimeout, int maxConnections, int minLargeMessageSize, int consumerWindowSize, int consumerMaxRate, int producerWindowSize, int producerMaxRate, boolean blockOnAcknowledge, boolean blockOnPersistentSend, boolean blockOnNonPersistentSend, boolean autoGroup, boolean preAcknowledge, java.lang.String loadBalancingPolicyClassName, int transactionBatchSize, int dupsOKBatchSize, long initialWaitTimeout, boolean useGlobalPools, int scheduledThreadPoolMaxSize, int threadPoolMaxSize, long retryInterval, double retryIntervalMultiplier, int reconnectAttempts, boolean failoverOnServerShutdown, java.util.List<java.lang.String> jndiBindings)
           
 void createConnectionFactory(java.lang.String name, TransportConfiguration liveTC, java.util.List<java.lang.String> jndiBindings)
           
 void createConnectionFactory(java.lang.String name, TransportConfiguration liveTC, java.lang.String clientID, java.util.List<java.lang.String> jndiBindings)
           
 void createConnectionFactory(java.lang.String name, TransportConfiguration liveTC, TransportConfiguration backupTC, java.util.List<java.lang.String> jndiBindings)
           
 void createConnectionFactory(java.lang.String name, TransportConfiguration liveTC, TransportConfiguration backupTC, java.lang.String clientID, java.util.List<java.lang.String> jndiBindings)
           
 boolean createQueue(java.lang.String queueName, java.lang.String jndiBinding, java.lang.String selectorString, boolean durable)
          Creates a JMS Queue.
 boolean createTopic(java.lang.String topicName, java.lang.String jndiBinding)
          Creates a JMS Topic
 boolean destroyConnectionFactory(java.lang.String name)
          destroys a connection factory.
 boolean destroyQueue(java.lang.String name)
          destroys a queue and removes it from JNDI
 boolean destroyTopic(java.lang.String name)
          destroys a topic and removes it from JNDI
 java.lang.String getVersion()
           
 boolean isStarted()
          Has the Server been started.
 java.lang.String[] listConnectionIDs()
           
 java.lang.String[] listRemoteAddresses()
           
 java.lang.String[] listRemoteAddresses(java.lang.String ipAddress)
           
 java.lang.String[] listSessions(java.lang.String connectionID)
           
 void setContext(javax.naming.Context context)
           
 void start()
           
 void stop()
           
 boolean undeployDestination(java.lang.String name)
          Remove the destination from JNDI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMSServerManagerImpl

public JMSServerManagerImpl(MessagingServer server)
                     throws java.lang.Exception
Throws:
java.lang.Exception

JMSServerManagerImpl

public JMSServerManagerImpl(MessagingServer server,
                            java.lang.String configFileName)
                     throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

activated

public void activated()
Specified by:
activated in interface ActivateCallback

start

public void start()
           throws java.lang.Exception
Specified by:
start in interface MessagingComponent
Throws:
java.lang.Exception

stop

public void stop()
          throws java.lang.Exception
Specified by:
stop in interface MessagingComponent
Throws:
java.lang.Exception

isStarted

public boolean isStarted()
Description copied from interface: JMSServerManager
Has the Server been started.

Specified by:
isStarted in interface MessagingComponent
Specified by:
isStarted in interface JMSServerManager
Returns:
true if the server us running

setContext

public void setContext(javax.naming.Context context)
Specified by:
setContext in interface JMSServerManager

getVersion

public java.lang.String getVersion()
Specified by:
getVersion in interface JMSServerManager

createQueue

public boolean createQueue(java.lang.String queueName,
                           java.lang.String jndiBinding,
                           java.lang.String selectorString,
                           boolean durable)
                    throws java.lang.Exception
Description copied from interface: JMSServerManager
Creates a JMS Queue.

Specified by:
createQueue in interface JMSServerManager
Parameters:
queueName - The name of the queue to create
jndiBinding - the name of the binding for JNDI
Returns:
true if the queue is created or if it existed and was added to JNDI
Throws:
java.lang.Exception - if problems were encountered creating the queue.

createTopic

public boolean createTopic(java.lang.String topicName,
                           java.lang.String jndiBinding)
                    throws java.lang.Exception
Description copied from interface: JMSServerManager
Creates a JMS Topic

Specified by:
createTopic in interface JMSServerManager
Parameters:
topicName - the name of the topic
jndiBinding - the name of the binding for JNDI
Returns:
true if the topic was created or if it existed and was added to JNDI
Throws:
java.lang.Exception - if a problem occurred creating the topic

undeployDestination

public boolean undeployDestination(java.lang.String name)
                            throws java.lang.Exception
Description copied from interface: JMSServerManager
Remove the destination from JNDI. Calling this method does not destroy the destination.

Specified by:
undeployDestination in interface JMSServerManager
Parameters:
name - the name of the destination to remove from JNDI
Returns:
true if removed
Throws:
java.lang.Exception - if a problem occurred removing the destination

destroyQueue

public boolean destroyQueue(java.lang.String name)
                     throws java.lang.Exception
Description copied from interface: JMSServerManager
destroys a queue and removes it from JNDI

Specified by:
destroyQueue in interface JMSServerManager
Parameters:
name - the name of the queue to destroy
Returns:
true if destroyed
Throws:
java.lang.Exception - if a problem occurred destroying the queue

destroyTopic

public boolean destroyTopic(java.lang.String name)
                     throws java.lang.Exception
Description copied from interface: JMSServerManager
destroys a topic and removes it from JNDI

Specified by:
destroyTopic in interface JMSServerManager
Parameters:
name - the name of the topic to destroy
Returns:
true if the topic was destroyed
Throws:
java.lang.Exception - if a problem occurred destroying the topic

createConnectionFactory

public void createConnectionFactory(java.lang.String name,
                                    java.util.List<Pair<TransportConfiguration,TransportConfiguration>> connectorConfigs,
                                    java.util.List<java.lang.String> jndiBindings)
                             throws java.lang.Exception
Specified by:
createConnectionFactory in interface JMSServerManager
Throws:
java.lang.Exception

createConnectionFactory

public void createConnectionFactory(java.lang.String name,
                                    java.util.List<Pair<TransportConfiguration,TransportConfiguration>> connectorConfigs,
                                    java.lang.String clientID,
                                    java.util.List<java.lang.String> jndiBindings)
                             throws java.lang.Exception
Specified by:
createConnectionFactory in interface JMSServerManager
Throws:
java.lang.Exception

createConnectionFactory

public void createConnectionFactory(java.lang.String name,
                                    java.util.List<Pair<TransportConfiguration,TransportConfiguration>> connectorConfigs,
                                    java.lang.String clientID,
                                    long clientFailureCheckPeriod,
                                    long connectionTTL,
                                    long callTimeout,
                                    int maxConnections,
                                    int minLargeMessageSize,
                                    int consumerWindowSize,
                                    int consumerMaxRate,
                                    int producerWindowSize,
                                    int producerMaxRate,
                                    boolean blockOnAcknowledge,
                                    boolean blockOnPersistentSend,
                                    boolean blockOnNonPersistentSend,
                                    boolean autoGroup,
                                    boolean preAcknowledge,
                                    java.lang.String loadBalancingPolicyClassName,
                                    int transactionBatchSize,
                                    int dupsOKBatchSize,
                                    boolean useGlobalPools,
                                    int scheduledThreadPoolMaxSize,
                                    int threadPoolMaxSize,
                                    long retryInterval,
                                    double retryIntervalMultiplier,
                                    int reconnectAttempts,
                                    boolean failoverOnServerShutdown,
                                    java.util.List<java.lang.String> jndiBindings)
                             throws java.lang.Exception
Specified by:
createConnectionFactory in interface JMSServerManager
Throws:
java.lang.Exception

createConnectionFactory

public void createConnectionFactory(java.lang.String name,
                                    java.lang.String discoveryAddress,
                                    int discoveryPort,
                                    java.lang.String clientID,
                                    long discoveryRefreshTimeout,
                                    long clientFailureCheckPeriod,
                                    long connectionTTL,
                                    long callTimeout,
                                    int maxConnections,
                                    int minLargeMessageSize,
                                    int consumerWindowSize,
                                    int consumerMaxRate,
                                    int producerWindowSize,
                                    int producerMaxRate,
                                    boolean blockOnAcknowledge,
                                    boolean blockOnPersistentSend,
                                    boolean blockOnNonPersistentSend,
                                    boolean autoGroup,
                                    boolean preAcknowledge,
                                    java.lang.String loadBalancingPolicyClassName,
                                    int transactionBatchSize,
                                    int dupsOKBatchSize,
                                    long initialWaitTimeout,
                                    boolean useGlobalPools,
                                    int scheduledThreadPoolMaxSize,
                                    int threadPoolMaxSize,
                                    long retryInterval,
                                    double retryIntervalMultiplier,
                                    int reconnectAttempts,
                                    boolean failoverOnServerShutdown,
                                    java.util.List<java.lang.String> jndiBindings)
                             throws java.lang.Exception
Specified by:
createConnectionFactory in interface JMSServerManager
Throws:
java.lang.Exception

createConnectionFactory

public void createConnectionFactory(java.lang.String name,
                                    java.lang.String discoveryAddress,
                                    int discoveryPort,
                                    java.util.List<java.lang.String> jndiBindings)
                             throws java.lang.Exception
Specified by:
createConnectionFactory in interface JMSServerManager
Throws:
java.lang.Exception

createConnectionFactory

public void createConnectionFactory(java.lang.String name,
                                    java.lang.String discoveryAddress,
                                    int discoveryPort,
                                    java.lang.String clientID,
                                    java.util.List<java.lang.String> jndiBindings)
                             throws java.lang.Exception
Specified by:
createConnectionFactory in interface JMSServerManager
Throws:
java.lang.Exception

createConnectionFactory

public void createConnectionFactory(java.lang.String name,
                                    TransportConfiguration liveTC,
                                    java.util.List<java.lang.String> jndiBindings)
                             throws java.lang.Exception
Specified by:
createConnectionFactory in interface JMSServerManager
Throws:
java.lang.Exception

createConnectionFactory

public void createConnectionFactory(java.lang.String name,
                                    TransportConfiguration liveTC,
                                    java.lang.String clientID,
                                    java.util.List<java.lang.String> jndiBindings)
                             throws java.lang.Exception
Specified by:
createConnectionFactory in interface JMSServerManager
Throws:
java.lang.Exception

createConnectionFactory

public void createConnectionFactory(java.lang.String name,
                                    TransportConfiguration liveTC,
                                    TransportConfiguration backupTC,
                                    java.util.List<java.lang.String> jndiBindings)
                             throws java.lang.Exception
Specified by:
createConnectionFactory in interface JMSServerManager
Throws:
java.lang.Exception

createConnectionFactory

public void createConnectionFactory(java.lang.String name,
                                    TransportConfiguration liveTC,
                                    TransportConfiguration backupTC,
                                    java.lang.String clientID,
                                    java.util.List<java.lang.String> jndiBindings)
                             throws java.lang.Exception
Specified by:
createConnectionFactory in interface JMSServerManager
Throws:
java.lang.Exception

destroyConnectionFactory

public boolean destroyConnectionFactory(java.lang.String name)
                                 throws java.lang.Exception
Description copied from interface: JMSServerManager
destroys a connection factory.

Specified by:
destroyConnectionFactory in interface JMSServerManager
Parameters:
name - the name of the connection factory to destroy
Returns:
true if the connection factory was destroyed
Throws:
java.lang.Exception - if a problem occurred destroying the connection factory

listRemoteAddresses

public java.lang.String[] listRemoteAddresses()
                                       throws java.lang.Exception
Specified by:
listRemoteAddresses in interface JMSServerManager
Throws:
java.lang.Exception

listRemoteAddresses

public java.lang.String[] listRemoteAddresses(java.lang.String ipAddress)
                                       throws java.lang.Exception
Specified by:
listRemoteAddresses in interface JMSServerManager
Throws:
java.lang.Exception

closeConnectionsForAddress

public boolean closeConnectionsForAddress(java.lang.String ipAddress)
                                   throws java.lang.Exception
Specified by:
closeConnectionsForAddress in interface JMSServerManager
Throws:
java.lang.Exception

listConnectionIDs

public java.lang.String[] listConnectionIDs()
                                     throws java.lang.Exception
Specified by:
listConnectionIDs in interface JMSServerManager
Throws:
java.lang.Exception

listSessions

public java.lang.String[] listSessions(java.lang.String connectionID)
                                throws java.lang.Exception
Specified by:
listSessions in interface JMSServerManager
Throws:
java.lang.Exception


Copyright © 2006 JBoss Inc. All Rights Reserved.