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

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

public class JMSServerManagerImpl
extends java.lang.Object
implements JMSServerManager

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
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.messaging.jms.server.JMSServerManager
JMSServerManager.ListType
 
Constructor Summary
JMSServerManagerImpl()
           
 
Method Summary
 boolean createConnectionFactory(java.lang.String name, java.lang.String clientID, int dupsOKBatchSize, int consumerWindowSize, int consumerMaxRate, int producerWindowSize, int producerMaxRate, boolean blockOnAcknowledge, boolean defaultSendNonPersistentMessagesBlocking, boolean defaultSendPersistentMessagesBlocking, java.util.List<java.lang.String> jndiBindings)
          Creates a connection factory
 boolean createConnectionFactory(java.lang.String name, java.lang.String clientID, int dupsOKBatchSize, int consumerWindowSize, int consumerMaxRate, int producerWindowSize, int producerMaxRate, boolean blockOnAcknowledge, boolean defaultSendNonPersistentMessagesBlocking, boolean defaultSendPersistentMessagesBlocking, java.lang.String jndiBinding)
          Creates a connection factory
 boolean createQueue(java.lang.String queueName, java.lang.String jndiBinding)
          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
 int getMessageCountForQueue(java.lang.String queue)
          returns how many messages a queue is currently holding
 boolean isStarted()
          Has the Server been started.
 java.util.List<SubscriptionInfo> listSubscriptions(java.lang.String topicName)
          lists all the subscriptions for a specific topic
 void removeAllMessagesForQueue(java.lang.String queueName)
          removes all messages from a particular queue
 void removeAllMessagesForTopic(java.lang.String topicName)
          removes all the messages from a topic
 void setInitialContext(javax.naming.InitialContext initialContext)
           
 void setMessagingServerManagement(MessagingServerManagement messagingServerManagement)
           
 void start()
          lifecycle method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMSServerManagerImpl

public JMSServerManagerImpl()
Method Detail

setMessagingServerManagement

public void setMessagingServerManagement(MessagingServerManagement messagingServerManagement)

start

public void start()
           throws java.lang.Exception
lifecycle method

Throws:
java.lang.Exception - ex

isStarted

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

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

createQueue

public boolean createQueue(java.lang.String queueName,
                           java.lang.String jndiBinding)
                    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

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 boolean createConnectionFactory(java.lang.String name,
                                       java.lang.String clientID,
                                       int dupsOKBatchSize,
                                       int consumerWindowSize,
                                       int consumerMaxRate,
                                       int producerWindowSize,
                                       int producerMaxRate,
                                       boolean blockOnAcknowledge,
                                       boolean defaultSendNonPersistentMessagesBlocking,
                                       boolean defaultSendPersistentMessagesBlocking,
                                       java.lang.String jndiBinding)
                                throws java.lang.Exception
Description copied from interface: JMSServerManager
Creates a connection factory

Specified by:
createConnectionFactory in interface JMSServerManager
Parameters:
name - the name of this connection factory
clientID - the client id
dupsOKBatchSize - the bath size
consumerWindowSize - The consumer window size
consumerMaxRate - the Consumer max rate
producerWindowSize - the producer window size
producerMaxRate - the producer max rate
jndiBinding - the binding name for JNDI
Returns:
true if the connection factory was created
Throws:
java.lang.Exception - if a problem occurred creating the connection factory

createConnectionFactory

public boolean createConnectionFactory(java.lang.String name,
                                       java.lang.String clientID,
                                       int dupsOKBatchSize,
                                       int consumerWindowSize,
                                       int consumerMaxRate,
                                       int producerWindowSize,
                                       int producerMaxRate,
                                       boolean blockOnAcknowledge,
                                       boolean defaultSendNonPersistentMessagesBlocking,
                                       boolean defaultSendPersistentMessagesBlocking,
                                       java.util.List<java.lang.String> jndiBindings)
                                throws java.lang.Exception
Description copied from interface: JMSServerManager
Creates a connection factory

Specified by:
createConnectionFactory in interface JMSServerManager
Parameters:
name - the name of this connection factory
clientID - the client id
dupsOKBatchSize - the bath size
consumerWindowSize - The consumer window size
consumerMaxRate - the Consumer max rate
producerWindowSize - the producer window size
producerMaxRate - the producer max rate
jndiBindings - the binding names for JNDI
Returns:
true if the connection factory was created
Throws:
java.lang.Exception - if a problem occurred creating the connection factory

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

removeAllMessagesForQueue

public void removeAllMessagesForQueue(java.lang.String queueName)
                               throws java.lang.Exception
Description copied from interface: JMSServerManager
removes all messages from a particular queue

Specified by:
removeAllMessagesForQueue in interface JMSServerManager
Parameters:
queueName - the name of the queue
Throws:
java.lang.Exception - if a problem occurred

removeAllMessagesForTopic

public void removeAllMessagesForTopic(java.lang.String topicName)
                               throws java.lang.Exception
Description copied from interface: JMSServerManager
removes all the messages from a topic

Specified by:
removeAllMessagesForTopic in interface JMSServerManager
Parameters:
topicName - the name of the topic
Throws:
java.lang.Exception - if a problem occurred

getMessageCountForQueue

public int getMessageCountForQueue(java.lang.String queue)
                            throws java.lang.Exception
Description copied from interface: JMSServerManager
returns how many messages a queue is currently holding

Specified by:
getMessageCountForQueue in interface JMSServerManager
Parameters:
queue - the name of the queue
Returns:
the number of messages
Throws:
java.lang.Exception - if a problem occurred

listSubscriptions

public java.util.List<SubscriptionInfo> listSubscriptions(java.lang.String topicName)
                                                   throws java.lang.Exception
Description copied from interface: JMSServerManager
lists all the subscriptions for a specific topic

Specified by:
listSubscriptions in interface JMSServerManager
Parameters:
topicName - the name of the topic
Returns:
the subscriptions
Throws:
java.lang.Exception - if a problem occurred

setInitialContext

public void setInitialContext(javax.naming.InitialContext initialContext)


Copyright © 2006 JBoss Inc. All Rights Reserved.