Joram 4.3.32

org.objectweb.joram.client.jms
Class Queue

java.lang.Object
  extended by org.objectweb.joram.client.jms.admin.AdministeredObject
      extended by org.objectweb.joram.client.jms.Destination
          extended by org.objectweb.joram.client.jms.Queue
All Implemented Interfaces:
fr.dyade.aaa.jndi2.soap.SoapObjectItf, java.io.Serializable, javax.jms.Destination, javax.jms.Queue, javax.naming.Referenceable, DestinationMBean, QueueMBean
Direct Known Subclasses:
DeadMQueue, TemporaryQueue

public class Queue
extends Destination
implements javax.jms.Queue, QueueMBean

Implements the javax.jms.Queue interface and provides Joram specific administration and monitoring methods. This is a proxy object a client uses to specify the destination of messages it is sending and the source of messages it receives.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.objectweb.joram.client.jms.Destination
adminName, agentId, BRIDGE_QUEUE, BRIDGE_TOPIC, CLUSTER_QUEUE, DEAD_MQUEUE, MAIL_QUEUE, MAIL_TOPIC, QUEUE, SCHEDULER_QUEUE, TOPIC
 
Constructor Summary
  Queue()
           
  Queue(java.lang.String name)
           
protected Queue(java.lang.String name, java.lang.String type)
           
 
Method Summary
 void addClusteredQueue(Queue addedQueue)
          Adds a queue into the cluster this queue belongs to.
 void clear()
           
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.
 void deleteMessage(java.lang.String msgId)
           
 java.lang.String getMessageDigest(java.lang.String msgId)
           
 java.util.Properties getMessageHeader(java.lang.String msgId)
           
 java.lang.String[] getMessageIds()
           
 java.util.Properties getMessageProperties(java.lang.String msgId)
           
 int getNbMaxMsg()
          Monitoring method returning the nbMaxMsg of this queue, -1 if no limit.
 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[] getQueueClusterElements()
          Returns the reference of the queues that belong to the cluster.
 java.lang.String getQueueName()
          Gets the The Joram's internal unique identifier of this queue.
 int getThreshold()
          Monitoring method returning the threshold of this queue, -1 if not set.
static boolean isQueue(java.lang.String type)
           
 javax.jms.Message readMessage(java.lang.String msgId)
           
 void removeClusteredQueue(Queue removedQueue)
          Removes a queue from the cluster this queue belongs to.
 void setNbMaxMsg(int nbMaxMsg)
          Admin method setting nbMaxMsg for this queue.
 void setThreshold(int threshold)
          Admin method setting or unsetting the threshold for this queue.
 
Methods inherited from class org.objectweb.joram.client.jms.Destination
addReader, addWriter, code, decode, delete, doCreate, equals, fromReference, getAdminName, getDMQ, getName, getReaderList, getReaders, getStatistic, getType, getWriterList, getWriters, isAssignableTo, isFreelyReadable, isFreelyWriteable, isQueue, newInstance, removeReader, removeWriter, setDMQ, setFreelyReadable, setFreelyWriteable, setFreeReading, setFreeWriting, setReader, setWriter, toReference, toString, toXml, unsetFreeReading, unsetFreeWriting, unsetReader, unsetWriter
 
Methods inherited from class org.objectweb.joram.client.jms.admin.AdministeredObject
getReference
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.jms.Queue
toString
 
Methods inherited from interface org.objectweb.joram.client.jms.QueueMBean
toString
 
Methods inherited from interface org.objectweb.joram.client.jms.DestinationMBean
addReader, addWriter, delete, getAdminName, getDMQ, getName, getReaderList, getStatistic, getType, getWriterList, isFreelyReadable, isFreelyWriteable, isQueue, removeReader, removeWriter, setDMQ, setFreelyReadable, setFreelyWriteable
 

Constructor Detail

Queue

public Queue()

Queue

public Queue(java.lang.String name)

Queue

protected Queue(java.lang.String name,
                java.lang.String type)
Method Detail

isQueue

public static boolean isQueue(java.lang.String type)

getQueueName

public java.lang.String getQueueName()
                              throws javax.jms.JMSException
Gets the The Joram's internal unique identifier of this queue. API method.

Specified by:
getQueueName in interface javax.jms.Queue
Returns:
The Joram's internal unique identifier.
Throws:
javax.jms.JMSException - Actually never thrown.

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. First a destination with the specified name is searched on the given server, if it does not exist it is created. In any case, its provider-specific address is returned.

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 MOM's 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. It creates a Joram's standart queue.

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. First a destination with the specified name is searched on the given server, if it does not exist it is created. In any case, its provider-specific address is returned.

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. First a destination with the specified name is searched on the given server, if it does not exist it is created. In any case, its provider-specific address is returned.

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.

Specified by:
setThreshold in interface QueueMBean
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.

Specified by:
getThreshold in interface QueueMBean
Throws:
java.net.ConnectException - If the admin connection is closed or broken.
AdminException - If the request fails.

setNbMaxMsg

public void setNbMaxMsg(int nbMaxMsg)
                 throws java.net.ConnectException,
                        AdminException
Admin method setting nbMaxMsg for this queue.

The request fails if the queue is deleted server side.

Specified by:
setNbMaxMsg in interface QueueMBean
Parameters:
nbMaxMsg - nb Max of Message (-1 no limit).
Throws:
java.net.ConnectException - If the admin connection is closed or broken.
AdminException - If the request fails.

getNbMaxMsg

public int getNbMaxMsg()
                throws java.net.ConnectException,
                       AdminException
Monitoring method returning the nbMaxMsg of this queue, -1 if no limit.

The request fails if the queue is deleted server side.

Specified by:
getNbMaxMsg in interface QueueMBean
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.

Specified by:
getPendingMessages in interface QueueMBean
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.

Specified by:
getPendingRequests in interface QueueMBean
Throws:
java.net.ConnectException - If the admin connection is closed or broken.
AdminException - If the request fails.

getMessageIds

public java.lang.String[] getMessageIds()
                                 throws AdminException,
                                        java.net.ConnectException
Specified by:
getMessageIds in interface QueueMBean
Throws:
AdminException
java.net.ConnectException

readMessage

public javax.jms.Message readMessage(java.lang.String msgId)
                              throws AdminException,
                                     java.net.ConnectException,
                                     javax.jms.JMSException
Throws:
AdminException
java.net.ConnectException
javax.jms.JMSException

getMessageDigest

public java.lang.String getMessageDigest(java.lang.String msgId)
                                  throws AdminException,
                                         java.net.ConnectException,
                                         javax.jms.JMSException
Specified by:
getMessageDigest in interface QueueMBean
Throws:
AdminException
java.net.ConnectException
javax.jms.JMSException

getMessageHeader

public java.util.Properties getMessageHeader(java.lang.String msgId)
                                      throws AdminException,
                                             java.net.ConnectException,
                                             javax.jms.JMSException
Specified by:
getMessageHeader in interface QueueMBean
Throws:
AdminException
java.net.ConnectException
javax.jms.JMSException

getMessageProperties

public java.util.Properties getMessageProperties(java.lang.String msgId)
                                          throws AdminException,
                                                 java.net.ConnectException,
                                                 javax.jms.JMSException
Specified by:
getMessageProperties in interface QueueMBean
Throws:
AdminException
java.net.ConnectException
javax.jms.JMSException

deleteMessage

public void deleteMessage(java.lang.String msgId)
                   throws AdminException,
                          java.net.ConnectException
Specified by:
deleteMessage in interface QueueMBean
Throws:
AdminException
java.net.ConnectException

clear

public void clear()
           throws AdminException,
                  java.net.ConnectException
Specified by:
clear in interface QueueMBean
Throws:
AdminException
java.net.ConnectException

addClusteredQueue

public void addClusteredQueue(Queue addedQueue)
                       throws java.net.ConnectException,
                              AdminException
Adds a queue into the cluster this queue belongs to. If this queue doesn't belong to a cluster then a cluster is created by clustering this queue with the added queue.

The request fails if one or both of the queues are deleted, or can't belong to a cluster.

Parameters:
addedQueue - queue added to the cluster
Throws:
java.net.ConnectException - If the admin connection is closed or broken.
AdminException - If the request fails.

removeClusteredQueue

public void removeClusteredQueue(Queue removedQueue)
                          throws java.net.ConnectException,
                                 AdminException
Removes a queue from the cluster this queue belongs to.

The request fails if the queue does not exist or is not part of any cluster.

Parameters:
removedQueue - queue removed from the cluster
Throws:
java.net.ConnectException - If the admin connection is closed or broken.
AdminException - If the request fails.

getQueueClusterElements

public java.lang.String[] getQueueClusterElements()
                                           throws java.net.ConnectException,
                                                  AdminException
Returns the reference of the queues that belong to the cluster.

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

Joram 4.3.32

Copyright © 2005 Scalagent - All rights reserved