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, java.io.Externalizable, javax.naming.Referenceable

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

Version:
$Revision: 1.7 $ $Date: 2003/08/07 13:32:50 $
Author:
Jim Alateras
See Also:
Serialized Form

Constructor Summary
JmsTemporaryQueue()
          Need a default constructor for the serialization
 
Method Summary
 void delete()
           
 java.lang.String getConnectionId()
          Return the identity of the owning connection as a string
 org.exolab.jms.client.JmsConnection getOwningConnection()
          Return the connection that owns this temporary destination.
 javax.naming.Reference getReference()
           
 void readExternal(java.io.ObjectInput stream)
           
 void setOwningConnection(org.exolab.jms.client.JmsConnection connection)
          Set the connection that owns this temp destination.
 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()
Need a default constructor for the serialization
Method Detail

delete

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

setOwningConnection

public void setOwningConnection(org.exolab.jms.client.JmsConnection connection)
Description copied from interface: JmsTemporaryDestination
Set the connection that owns this temp destination. This destination is scoped by this connection and cannot be used outside of this scope
Specified by:
setOwningConnection in interface JmsTemporaryDestination
Following copied from interface: org.exolab.jms.client.JmsTemporaryDestination
Parameters:
connection -  

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 java.lang.String getConnectionId()
Description copied from interface: JmsTemporaryDestination
Return the identity of the owning connection as a string
Specified by:
getConnectionId in interface JmsTemporaryDestination
Following copied from interface: org.exolab.jms.client.JmsTemporaryDestination
Returns:
String

getReference

public javax.naming.Reference getReference()
Specified by:
getReference in interface javax.naming.Referenceable
Overrides:
getReference in class JmsQueue

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
Specified by:
writeExternal in interface java.io.Externalizable
Overrides:
writeExternal in class JmsQueue

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


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