org.objectweb.joram.client.jms

Class Queue

Implemented Interfaces:
javax.jms.Destination, javax.jms.Queue, javax.naming.Referenceable, java.io.Serializable, SoapObjectItf
Known Direct 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(String agentId)
Constructs a queue.
Queue(String agentId, String name)
Constructs a queue.

Method Summary

static Queue
create()
Admin method creating and deploying a queue on the local server.
static Queue
create(String name)
Admin method creating and deploying (or retrieving) 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, Properties prop)
Admin method creating and deploying a queue on a given server.
static Queue
create(int serverId, String name)
Admin method creating and deploying (or retrieving) a queue on a given server with a given name.
static Queue
create(int serverId, String className, Properties prop)
Admin method creating and deploying a queue on a given server.
static Queue
create(int serverId, String name, String className, Properties prop)
Admin method creating and deploying (or retrieving) a queue on a given server.
Object
decode(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.
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.
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

code, getInstance, getReference

Constructor Details

Queue

public Queue()
Constructs an empty queue.


Queue

public Queue(String agentId)
Constructs a queue.

Parameters:
agentId - Identifier of the queue agent.


Queue

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

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

Method Details

create

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

The request fails if the destination deployement fails server side.

Throws:
AdminException - If the request fails.


create

public static Queue create(String name)
            throws 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:
AdminException - If the request fails.


create

public static Queue create(int serverId)
            throws 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:
AdminException - If the request fails.


create

public static Queue create(int serverId,
                           Properties prop)
            throws 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:
AdminException - If the request fails.


create

public static Queue create(int serverId,
                           String name)
            throws 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:
AdminException - If the request fails.


create

public static Queue create(int serverId,
                           String className,
                           Properties prop)
            throws 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:
AdminException - If the request fails.


create

public static Queue create(int serverId,
                           String name,
                           String className,
                           Properties prop)
            throws 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:
AdminException - If the request fails.


decode

public Object decode(Hashtable h)
Decodes a Queue which traveled through the SOAP protocol.
Specified by:
decode in interface SoapObjectItf


getPendingMessages

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

The request fails if the queue is deleted server side.

Throws:
AdminException - If the request fails.


getPendingRequests

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

The request fails if the queue is deleted server side.

Throws:
AdminException - If the request fails.


getQueueName

public String getQueueName()
            throws JMSException
API method.


getThreshold

public int getThreshold()
            throws 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:
AdminException - If the request fails.


setThreshold

public void setThreshold(int threshold)
            throws 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:
AdminException - If the request fails.


toString

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


Copyright B) 2004 Scalagent - All rights reserved