SonicMQ API

progress.message.jclient
Class Queue

java.lang.Object
  extended by progress.message.jclient.Queue
All Implemented Interfaces:
java.io.Serializable, Destination, Queue, javax.naming.Referenceable

public class Queue
extends java.lang.Object
implements Queue, javax.naming.Referenceable, java.io.Serializable

A Queue object encapsulates a provider-specific queue name. It is the way a client specifies the identity of queue to JMS methods. The actual length of time messages are held by a queue and the consequences of resource overflow are not defined by JMS.

Version:
1.0 - 7-Jul-1999
Author:
May Hsu
See Also:
Queue, Serialized Form

Constructor Summary
Queue()
          Contruct a Queue.
Queue(java.lang.String queueName)
          Construct a Queue.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getName()
           
 java.lang.String getQueueName()
          Get the name of this queue.
 javax.naming.Reference getReference()
          Return a javax.naming.Reference object which contains the reference information necessary to create an object of the proper type.
 int hashCode()
           
 void setName(java.lang.String name)
           
 void setQueueName(java.lang.String name)
          Set the queue name.
 java.lang.String toString()
          Return a pretty printed version of the queue name.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Queue

public Queue(java.lang.String queueName)
      throws JMSException
Construct a Queue.

Parameters:
queueName - the name of the queue
Throws:
JMSException

Queue

public Queue()
Contruct a Queue. This contructor is provided to be used in conjunction with the setter setQueueName. A Queue object that does not refer to a particular queue will generate an error if it used in messaging.

See Also:
setQueueName(java.lang.String)
Method Detail

getQueueName

public java.lang.String getQueueName()
                              throws JMSException
Get the name of this queue.

Clients that depend upon the name, are not portable.

Specified by:
getQueueName in interface Queue
Returns:
the queue name
Throws:
JMSException - if JMS implementation for Queue fails to to return queue name due to some internal error.

setQueueName

public void setQueueName(java.lang.String name)
                  throws JMSException
Set the queue name.

Parameters:
name - The queue name
Throws:
JMSException

toString

public java.lang.String toString()
Return a pretty printed version of the queue name.

Specified by:
toString in interface Queue
Overrides:
toString in class java.lang.Object
Returns:
the provider specific identity values for this queue.

getReference

public javax.naming.Reference getReference()
                                    throws javax.naming.NamingException
Return a javax.naming.Reference object which contains the reference information necessary to create an object of the proper type.

Specified by:
getReference in interface javax.naming.Referenceable
Returns:
the Reference object, which contains information to create the desired object.
Throws:
javax.naming.NamingException - if Reference naming fails

setName

public void setName(java.lang.String name)
             throws JMSException
Throws:
JMSException

getName

public java.lang.String getName()
                         throws JMSException
Throws:
JMSException

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

SonicMQ API

Copyright © 1999-2010 Progress Software Corporation. All Rights Reserved.
HTML formatted on 15-September-2010.