org.objectweb.joram.client.jms
Class Queue

java.lang.Object
  extended byorg.objectweb.joram.client.jms.admin.AdministeredObject
      extended byorg.objectweb.joram.client.jms.Destination
          extended byorg.objectweb.joram.client.jms.Queue
All Implemented Interfaces:
javax.jms.Destination, javax.jms.Queue, javax.naming.Referenceable, java.io.Serializable, SoapObjectItf
Direct Known Subclasses:
DeadMQueue, TemporaryQueue

public class Queue
extends Destination
implements javax.jms.Queue

Implements the javax.jms.Queue interface and provides JORAM specific administration and monitoring methods.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.objectweb.joram.client.jms.Destination
adminName, agentId
 
Fields inherited from class org.objectweb.joram.client.jms.admin.AdministeredObject
id, instancesTable
 
Constructor Summary
Queue()
          Constructs an empty queue.
Queue(java.lang.String agentId)
          Constructs a queue.
Queue(java.lang.String agentId, java.lang.String name)
          Constructs a queue.
 
Method Summary
static Queue create()
          Admin method creating and deploying a queue on the local server.
static Queue create(int serverId)
          Admin method creating and deploying a queue on a given server.
static Queue create(int serverId, java.util.Properties prop)
          Admin method creating and deploying a queue on a given server.
static Queue create(int serverId, java.lang.String name)
          Admin method creating and deploying (or retrieving) a queue on a given server with a given name.
static Queue create(int serverId, java.lang.String className, java.util.Properties prop)
          Admin method creating and deploying a queue on a given server.
static Queue create(int serverId, java.lang.String name, java.lang.String className, java.util.Properties prop)
          Admin method creating and deploying (or retrieving) a queue on a given server.
static Queue create(java.lang.String name)
          Admin method creating and deploying (or retrieving) a queue on the local server.
 java.lang.Object decode(java.util.Hashtable h)
          Decodes a Queue which traveled through the SOAP protocol.
 int getPendingMessages()
          Monitoring method returning the number of pending messages on this queue.
 int getPendingRequests()
          Monitoring method returning the number of pending requests on this queue.
 java.lang.String getQueueName()
          API method.
 int getThreshold()
          Monitoring method returning the threshold of this queue, -1 if not set.
 void setThreshold(int threshold)
          Admin method setting or unsetting the threshold for this queue.
 java.lang.String toString()
          Returns a String image of the queue.
 
Methods inherited from class org.objectweb.joram.client.jms.Destination
code, delete, doCreate, equals, getAdminName, getDMQ, getName, getReaders, getReference, getWriters, isFreelyReadable, isFreelyWriteable, isQueue, setDMQ, setFreeReading, setFreeWriting, setReader, setWriter, unsetFreeReading, unsetFreeWriting, unsetReader, unsetWriter
 
Methods inherited from class org.objectweb.joram.client.jms.admin.AdministeredObject
getInstance
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Queue

public Queue(java.lang.String agentId)
Constructs a queue.

Parameters:
agentId - Identifier of the queue agent.

Queue

public Queue(java.lang.String agentId,
             java.lang.String name)
Constructs a queue.

Parameters:
agentId - Identifier of the queue agent.
name - Name set by administrator.

Queue

public Queue()
Constructs an empty queue.

Method Detail

toString

public java.lang.String toString()
Returns a String image of the queue.

Specified by:
toString in interface javax.jms.Queue

getQueueName

public java.lang.String getQueueName()
                              throws javax.jms.JMSException
API method.

Specified by:
getQueueName in interface javax.jms.Queue
Throws:
javax.jms.JMSException - Actually never thrown.

decode

public java.lang.Object decode(java.util.Hashtable h)
Decodes a Queue which traveled through the SOAP protocol.

Specified by:
decode in interface SoapObjectItf

create

public static Queue create(int serverId,
                           java.lang.String name,
                           java.lang.String className,
                           java.util.Properties prop)
                    throws java.net.ConnectException,
                           AdminException
Admin method creating and deploying (or retrieving) a queue on a given server.

The request fails if the target server does not belong to the platform, or if the destination deployement fails server side.

Parameters:
serverId - The identifier of the server where deploying the queue.
name - The name of the queue.
className - The queue class name.
prop - The queue properties.
Throws:
java.net.ConnectException - If the admin connection is closed or broken.
AdminException - If the request fails.

create

public static Queue create(int serverId,
                           java.lang.String className,
                           java.util.Properties prop)
                    throws java.net.ConnectException,
                           AdminException
Admin method creating and deploying a queue on a given server.

The request fails if the target server does not belong to the platform, or if the destination deployement fails server side.

Parameters:
serverId - The identifier of the server where deploying the queue.
className - The queue class name.
prop - The queue properties.
Throws:
java.net.ConnectException - If the admin connection is closed or broken.
AdminException - If the request fails.

create

public static Queue create(int serverId,
                           java.util.Properties prop)
                    throws java.net.ConnectException,
                           AdminException
Admin method creating and deploying a queue on a given server.

The request fails if the target server does not belong to the platform, or if the destination deployement fails server side.

Parameters:
serverId - The identifier of the server where deploying the queue.
prop - The queue properties.
Throws:
java.net.ConnectException - If the admin connection is closed or broken.
AdminException - If the request fails.

create

public static Queue create(int serverId,
                           java.lang.String name)
                    throws java.net.ConnectException,
                           AdminException
Admin method creating and deploying (or retrieving) a queue on a given server with a given name.

The request fails if the target server does not belong to the platform, or if the destination deployement fails server side.

Parameters:
serverId - The identifier of the server where deploying the queue.
name - The queue name.
Throws:
java.net.ConnectException - If the admin connection is closed or broken.
AdminException - If the request fails.

create

public static Queue create(java.lang.String name)
                    throws java.net.ConnectException,
                           AdminException
Admin method creating and deploying (or retrieving) a queue on the local server.

The request fails if the destination deployement fails server side.

Parameters:
name - The queue name.
Throws:
java.net.ConnectException - If the admin connection is closed or broken.
AdminException - If the request fails.

create

public static Queue create(int serverId)
                    throws java.net.ConnectException,
                           AdminException
Admin method creating and deploying a queue on a given server.

The request fails if the target server does not belong to the platform, or if the destination deployement fails server side.

Parameters:
serverId - The identifier of the server where deploying the queue.
Throws:
java.net.ConnectException - If the admin connection is closed or broken.
AdminException - If the request fails.

create

public static Queue create()
                    throws java.net.ConnectException,
                           AdminException
Admin method creating and deploying a queue on the local server.

The request fails if the destination deployement fails server side.

Throws:
java.net.ConnectException - If the admin connection is closed or broken.
AdminException - If the request fails.

setThreshold

public void setThreshold(int threshold)
                  throws java.net.ConnectException,
                         AdminException
Admin method setting or unsetting the threshold for this queue.

The request fails if the queue is deleted server side.

Parameters:
threshold - The threshold value to be set (-1 for unsetting previous value).
Throws:
java.net.ConnectException - If the admin connection is closed or broken.
AdminException - If the request fails.

getThreshold

public int getThreshold()
                 throws java.net.ConnectException,
                        AdminException
Monitoring method returning the threshold of this queue, -1 if not set.

The request fails if the queue is deleted server side.

Throws:
java.net.ConnectException - If the admin connection is closed or broken.
AdminException - If the request fails.

getPendingMessages

public int getPendingMessages()
                       throws java.net.ConnectException,
                              AdminException
Monitoring method returning the number of pending messages on this queue.

The request fails if the queue is deleted server side.

Throws:
java.net.ConnectException - If the admin connection is closed or broken.
AdminException - If the request fails.

getPendingRequests

public int getPendingRequests()
                       throws java.net.ConnectException,
                              AdminException
Monitoring method returning the number of pending requests on this queue.

The request fails if the queue is deleted server side.

Throws:
java.net.ConnectException - If the admin connection is closed or broken.
AdminException - If the request fails.


Copyright ? 2004 Scalagent - All rights reserved