|
Joram 5.3.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, COLLECTOR_QUEUE, COLLECTOR_TOPIC, DEAD_MQUEUE, JMXBeanName, logger, MAIL_QUEUE, MAIL_TOPIC, MONITORING_QUEUE, MONITORING_TOPIC, QUEUE, QUEUE_TYPE, SCHEDULER_QUEUE, TEMPORARY, TOPIC, TOPIC_TYPE |
Constructor Summary | |
---|---|
|
Queue()
|
|
Queue(java.lang.String name)
|
protected |
Queue(java.lang.String name,
byte 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. |
static Queue |
createQueue(java.lang.String agentId,
java.lang.String name)
|
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. |
javax.jms.Message |
readMessage(java.lang.String msgId)
Deprecated. Since Joram 5.2 use getMessage. |
void |
registerAsDefaultDMQ()
Sets the current queue as the default DMQ for the local server. |
void |
registerAsDefaultDMQ(int serverId)
Sets the current queue as the default DMQ for the given server. |
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. |
java.lang.String |
toString()
Returns a String image of the queue. |
Methods inherited from class org.objectweb.joram.client.jms.Destination |
---|
addReader, addWriter, check, checkId, code, decode, delete, doCreate, doRequest, equals, fromReference, getAdminName, getDMQ, getDMQId, getJMXBeanName, getName, getReaderList, getReaders, getStatistic, getStatistics, getType, getWrapper, getWriterList, getWriters, hashCode, isFreelyReadable, isFreelyWriteable, isQueue, isTopic, newInstance, registerMBean, removeReader, removeWriter, setDMQ, setDMQId, setFreelyReadable, setFreelyWriteable, setFreeReading, setFreeWriting, setReader, setWrapper, setWriter, toReference, toXml, unregisterMBean, 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, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.objectweb.joram.client.jms.DestinationMBean |
---|
addReader, addWriter, delete, getAdminName, getDMQId, getName, getReaderList, getStatistic, getStatistics, getWriterList, isFreelyReadable, isFreelyWriteable, isQueue, isTopic, removeReader, removeWriter, setDMQId, setFreelyReadable, setFreelyWriteable |
Constructor Detail |
---|
public Queue()
public Queue(java.lang.String name)
protected Queue(java.lang.String name, byte type)
Method Detail |
---|
public java.lang.String toString()
toString
in interface javax.jms.Queue
toString
in class java.lang.Object
public java.lang.String getQueueName() throws javax.jms.JMSException
getQueueName
in interface javax.jms.Queue
javax.jms.JMSException
- Actually never thrown.public static Queue createQueue(java.lang.String agentId, java.lang.String name)
public static Queue create() throws java.net.ConnectException, AdminException
The request fails if the destination deployment fails server side.
Be careful this method use the static AdminModule connection.
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.
Be careful this method use the static AdminModule connection.
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(java.lang.String name) throws java.net.ConnectException, AdminException
The request fails if the destination deployment fails server side.
Be careful this method use the static AdminModule connection.
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, 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.
Be careful this method use the static AdminModule connection.
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(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.
Be careful this method use the static AdminModule connection.
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 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.
Be careful this method use the static AdminModule connection.
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.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.
Be careful this method use the static AdminModule connection.
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 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
- The identifier of the message.
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.public void registerAsDefaultDMQ() throws java.net.ConnectException, AdminException
registerAsDefaultDMQ
in interface QueueMBean
java.net.ConnectException
- If the connection fails.
AdminException
- Never thrown.public void registerAsDefaultDMQ(int serverId) throws java.net.ConnectException, AdminException
The request fails if the target server does not belong to the platform.
registerAsDefaultDMQ
in interface QueueMBean
serverId
- The identifier of the server.
java.net.ConnectException
- If the connection fails.
AdminException
- If the request fails.
|
Joram 5.3.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |