org.jboss.messaging.core.management.impl
Class MessagingServerManagementImpl

java.lang.Object
  extended by org.jboss.messaging.core.management.impl.MessagingServerManagementImpl
All Implemented Interfaces:
MessagingServerManagement, MessagingComponent

public class MessagingServerManagementImpl
extends java.lang.Object
implements MessagingServerManagement, MessagingComponent

This interface describes the properties and operations that comprise the management interface of the Messaging Server.

It includes operations to create and destroy queues and provides various statistics measures such as message count for queues and topics.

Author:
Andy Taylor

Constructor Summary
MessagingServerManagementImpl()
           
 
Method Summary
 boolean addDestination(SimpleString address)
          add an address to the post office
 void createQueue(SimpleString address, SimpleString name)
          creates a queue with the specified address
 void destroyQueue(SimpleString name)
          destroy a particular queue
 Configuration getConfiguration()
          list all available addresses
 int getMessageCountForQueue(SimpleString queue)
          count the number of messages in a queue
 java.util.List<Queue> getQueuesForAddress(SimpleString address)
          returns all the queues for a specific address
 boolean isStarted()
          is the server started
 void removeAllMessagesForAddress(SimpleString address)
          remove all the messages for a specific address
 boolean removeDestination(SimpleString address)
          remove an address from the post office
 void setMessagingServer(MessagingServer messagingServer)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessagingServerManagementImpl

public MessagingServerManagementImpl()
Method Detail

setMessagingServer

public void setMessagingServer(MessagingServer messagingServer)

isStarted

public boolean isStarted()
Description copied from interface: MessagingServerManagement
is the server started

Specified by:
isStarted in interface MessagingServerManagement
Returns:
true if the server is running

createQueue

public void createQueue(SimpleString address,
                        SimpleString name)
                 throws java.lang.Exception
Description copied from interface: MessagingServerManagement
creates a queue with the specified address

Specified by:
createQueue in interface MessagingServerManagement
Parameters:
address - the address
name - the name of the queue
Throws:
java.lang.Exception - if a problem occurred

destroyQueue

public void destroyQueue(SimpleString name)
                  throws java.lang.Exception
Description copied from interface: MessagingServerManagement
destroy a particular queue

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

addDestination

public boolean addDestination(SimpleString address)
                       throws java.lang.Exception
Description copied from interface: MessagingServerManagement
add an address to the post office

Specified by:
addDestination in interface MessagingServerManagement
Parameters:
address - the address to add
Returns:
true if the address was added
Throws:
java.lang.Exception - if a problem occurred

removeDestination

public boolean removeDestination(SimpleString address)
                          throws java.lang.Exception
Description copied from interface: MessagingServerManagement
remove an address from the post office

Specified by:
removeDestination in interface MessagingServerManagement
Parameters:
address - the address to remove
Returns:
true if the address was removed
Throws:
java.lang.Exception - if a problem occurred

removeAllMessagesForAddress

public void removeAllMessagesForAddress(SimpleString address)
                                 throws java.lang.Exception
Description copied from interface: MessagingServerManagement
remove all the messages for a specific address

Specified by:
removeAllMessagesForAddress in interface MessagingServerManagement
Parameters:
address - the address
Throws:
java.lang.Exception - if a problem occurred

getQueuesForAddress

public java.util.List<Queue> getQueuesForAddress(SimpleString address)
                                          throws java.lang.Exception
Description copied from interface: MessagingServerManagement
returns all the queues for a specific address

Specified by:
getQueuesForAddress in interface MessagingServerManagement
Parameters:
address - the address
Returns:
the queues
Throws:
java.lang.Exception - if a problem occurred

getMessageCountForQueue

public int getMessageCountForQueue(SimpleString queue)
                            throws java.lang.Exception
Description copied from interface: MessagingServerManagement
count the number of messages in a queue

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

getConfiguration

public Configuration getConfiguration()
Description copied from interface: MessagingServerManagement
list all available addresses

Specified by:
getConfiguration in interface MessagingServerManagement
Returns:
the addresses

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


Copyright © 2006 JBoss Inc. All Rights Reserved.