org.exolab.jms.client
Class JmsTemporaryQueue

java.lang.Object
  |
  +--org.exolab.jms.message.DestinationImpl
        |
        +--org.exolab.jms.client.JmsDestination
              |
              +--org.exolab.jms.client.JmsQueue
                    |
                    +--org.exolab.jms.client.JmsTemporaryQueue
All Implemented Interfaces:
java.lang.Cloneable, javax.jms.Destination, java.io.Externalizable, JmsTemporaryDestination, javax.jms.Queue, javax.naming.Referenceable, java.io.Serializable, javax.jms.TemporaryQueue

public class JmsTemporaryQueue
extends JmsQueue
implements javax.jms.TemporaryQueue, JmsTemporaryDestination

A temporary queue is created by a client through a session and has a lifetime of the session's connection.

Version:
$Revision: 1.2 $ $Date: 2005/12/20 20:36:43 $
Author:
Jim Alateras
See Also:
Serialized Form

Constructor Summary
JmsTemporaryQueue()
          Constructor provided for serialization.
 
Method Summary
static javax.jms.TemporaryQueue create(org.exolab.jms.client.JmsConnection connection)
          Construct a new temporary queue.
 void delete()
           
 long getConnectionId()
          Return the identity of the owning connection
 org.exolab.jms.client.JmsConnection getOwningConnection()
          Return the connection that owns this temporary destination.
 javax.naming.Reference getReference()
          Retrieves the Reference of this object
 void readExternal(java.io.ObjectInput stream)
           
 boolean validForConnection(org.exolab.jms.client.JmsConnection connection)
          Checks whether the temporary destination is valid for the specified connection
 void writeExternal(java.io.ObjectOutput stream)
           
 
Methods inherited from class org.exolab.jms.client.JmsQueue
equals, getQueueName, hashCode
 
Methods inherited from class org.exolab.jms.client.JmsDestination
getName, getPersistent, isTemporaryDestination, isTemporaryDestination, setPersistent, toString
 
Methods inherited from class org.exolab.jms.message.DestinationImpl
clone, getDestination, isEqual
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.jms.Queue
getQueueName, toString
 

Constructor Detail

JmsTemporaryQueue

public JmsTemporaryQueue()
Constructor provided for serialization.
Method Detail

delete

public void delete()
            throws javax.jms.JMSException
Specified by:
delete in interface javax.jms.TemporaryQueue

getOwningConnection

public org.exolab.jms.client.JmsConnection getOwningConnection()
Description copied from interface: JmsTemporaryDestination
Return the connection that owns this temporary destination.
Specified by:
getOwningConnection in interface JmsTemporaryDestination
Following copied from interface: org.exolab.jms.client.JmsTemporaryDestination
Returns:
JmsConnection

getConnectionId

public long getConnectionId()
Description copied from interface: JmsTemporaryDestination
Return the identity of the owning connection
Specified by:
getConnectionId in interface JmsTemporaryDestination
Following copied from interface: org.exolab.jms.client.JmsTemporaryDestination
Returns:
the identity of the owning connection

getReference

public javax.naming.Reference getReference()
Description copied from class: JmsQueue
Retrieves the Reference of this object
Overrides:
getReference in class JmsQueue
Following copied from class: org.exolab.jms.client.JmsQueue
Returns:
the non-null Reference of this object

validForConnection

public boolean validForConnection(org.exolab.jms.client.JmsConnection connection)
Description copied from interface: JmsTemporaryDestination
Checks whether the temporary destination is valid for the specified connection
Specified by:
validForConnection in interface JmsTemporaryDestination
Following copied from interface: org.exolab.jms.client.JmsTemporaryDestination
Parameters:
connection - - the connection to test against
Returns:
boolean - true if it can be used.

writeExternal

public void writeExternal(java.io.ObjectOutput stream)
                   throws java.io.IOException
Overrides:
writeExternal in class JmsQueue

readExternal

public void readExternal(java.io.ObjectInput stream)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Overrides:
readExternal in class JmsQueue

create

public static javax.jms.TemporaryQueue create(org.exolab.jms.client.JmsConnection connection)
Construct a new temporary queue.
Parameters:
connection - the connection owns that the queue
Returns:
a new temporary queue


Copyright © 1999-2007 The OpenJMS Group. All Rights Reserved.