|
Joram 5.2.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.joram.client.jms.admin.AdministeredObject
org.objectweb.joram.client.jms.Destination
org.objectweb.joram.client.jms.Queue
public class Queue
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.
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)
|
javax.jms.Message |
getMessage(java.lang.String msgId)
Returns a copy of the message. |
java.lang.String |
getMessageDigest(java.lang.String msgId)
|
java.util.Properties |
getMessageHeader(java.lang.String msgId)
|
java.lang.String[] |
getMessageIds()
Returns the identifiers of all messages in this queue. |
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)
Deprecated. |
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, getDMQId, getName, getReaderList, getReaders, getStatistic, getStatistics, getType, getWriterList, getWriters, isAssignableTo, isFreelyReadable, isFreelyWriteable, isQueue, newInstance, removeReader, removeWriter, setDMQ, setDMQId, 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, wait, wait, wait |
Methods inherited from interface javax.jms.Queue |
---|
toString |
Methods inherited from interface org.objectweb.joram.client.jms.DestinationMBean |
---|
addReader, addWriter, delete, getAdminName, getDMQId, getName, getReaderList, getStatistic, getStatistics, getType, getWriterList, isFreelyReadable, isFreelyWriteable, isQueue, removeReader, removeWriter, setDMQId, setFreelyReadable, setFreelyWriteable |
Constructor Detail |
---|
public Queue()
public Queue(java.lang.String name)
protected Queue(java.lang.String name, java.lang.String type)
Method Detail |
---|
public static boolean isQueue(java.lang.String type)
public java.lang.String getQueueName() throws javax.jms.JMSException
getQueueName
in interface javax.jms.Queue
javax.jms.JMSException
- Actually never thrown.public static Queue create(int serverId, java.lang.String name, java.lang.String className, java.util.Properties prop) throws java.net.ConnectException, AdminException
The request fails if the target server does not belong to the platform, or if the destination deployment fails server side.
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.
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.public static Queue create(int serverId, java.lang.String className, java.util.Properties prop) throws java.net.ConnectException, AdminException
The request fails if the target server does not belong to the platform, or if the destination deployment fails server side.
serverId
- The identifier of the server where deploying the queue.className
- The queue class name.prop
- The queue properties.
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.public static Queue create(int serverId, java.util.Properties prop) throws java.net.ConnectException, AdminException
The request fails if the target server does not belong to the platform, or if the destination deployment fails server side.
serverId
- The identifier of the server where deploying the queue.prop
- The queue properties.
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.public static Queue create(int serverId, java.lang.String name) throws java.net.ConnectException, AdminException
The request fails if the target server does not belong to the platform, or if the destination deployment fails server side.
serverId
- The identifier of the server where deploying the queue.name
- The queue name.
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.public static Queue create(java.lang.String name) throws java.net.ConnectException, AdminException
The request fails if the destination deployment fails server side.
name
- The queue name.
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.public static Queue create(int serverId) throws java.net.ConnectException, AdminException
The request fails if the target server does not belong to the platform, or if the destination deployment fails server side.
serverId
- The identifier of the server where deploying the queue.
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.public static Queue create() throws java.net.ConnectException, AdminException
The request fails if the destination deployment fails server side.
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.public void setThreshold(int threshold) throws java.net.ConnectException, AdminException
The request fails if the queue is deleted server side.
setThreshold
in interface QueueMBean
threshold
- The threshold value to be set (-1 for unsetting
previous value).
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.public int getThreshold() throws java.net.ConnectException, AdminException
The request fails if the queue is deleted server side.
getThreshold
in interface QueueMBean
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.public void setNbMaxMsg(int nbMaxMsg) throws java.net.ConnectException, AdminException
The request fails if the queue is deleted server side.
setNbMaxMsg
in interface QueueMBean
nbMaxMsg
- nb Max of Message (-1 no limit).
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.public int getNbMaxMsg() throws java.net.ConnectException, AdminException
The request fails if the queue is deleted server side.
getNbMaxMsg
in interface QueueMBean
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.public int getPendingMessages() throws java.net.ConnectException, AdminException
The request fails if the queue is deleted server side.
getPendingMessages
in interface QueueMBean
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.public int getPendingRequests() throws java.net.ConnectException, AdminException
The request fails if the queue is deleted server side.
getPendingRequests
in interface QueueMBean
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.public java.lang.String[] getMessageIds() throws AdminException, java.net.ConnectException
getMessageIds
in interface QueueMBean
AdminException
java.net.ConnectException
QueueMBean.getMessageIds()
public javax.jms.Message getMessage(java.lang.String msgId) throws AdminException, java.net.ConnectException, javax.jms.JMSException
msgId
- THe identifier of the message.
AdminException
java.net.ConnectException
javax.jms.JMSException
public javax.jms.Message readMessage(java.lang.String msgId) throws AdminException, java.net.ConnectException, javax.jms.JMSException
msgId
-
AdminException
java.net.ConnectException
javax.jms.JMSException
public java.lang.String getMessageDigest(java.lang.String msgId) throws AdminException, java.net.ConnectException, javax.jms.JMSException
getMessageDigest
in interface QueueMBean
AdminException
java.net.ConnectException
javax.jms.JMSException
public java.util.Properties getMessageHeader(java.lang.String msgId) throws AdminException, java.net.ConnectException, javax.jms.JMSException
getMessageHeader
in interface QueueMBean
AdminException
java.net.ConnectException
javax.jms.JMSException
public java.util.Properties getMessageProperties(java.lang.String msgId) throws AdminException, java.net.ConnectException, javax.jms.JMSException
getMessageProperties
in interface QueueMBean
AdminException
java.net.ConnectException
javax.jms.JMSException
public void deleteMessage(java.lang.String msgId) throws AdminException, java.net.ConnectException
deleteMessage
in interface QueueMBean
AdminException
java.net.ConnectException
public void clear() throws AdminException, java.net.ConnectException
clear
in interface QueueMBean
AdminException
java.net.ConnectException
public void addClusteredQueue(Queue addedQueue) throws java.net.ConnectException, AdminException
The request fails if one or both of the queues are deleted, or can't belong to a cluster.
addedQueue
- queue added to the cluster
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.public void removeClusteredQueue(Queue removedQueue) throws java.net.ConnectException, AdminException
The request fails if the queue does not exist or is not part of any cluster.
removedQueue
- queue removed from the cluster
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.public java.lang.String[] getQueueClusterElements() throws java.net.ConnectException, AdminException
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.
|
Joram 5.2.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |