org.exolab.jms.client
Class JmsTemporaryQueue

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

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, toString, 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
Throws:
javax.jms.JMSException

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
Returns:
JmsConnection

getConnectionId

public long getConnectionId()
Description copied from interface: JmsTemporaryDestination
Return the identity of the owning connection

Specified by:
getConnectionId in interface 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

Specified by:
getReference in interface javax.naming.Referenceable
Overrides:
getReference in class 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
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
Specified by:
writeExternal in interface java.io.Externalizable
Overrides:
writeExternal in class JmsQueue
Throws:
java.io.IOException

readExternal

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

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-2012 The OpenJMS Group. All Rights Reserved.