JSlim  


com.gtcgroup.jslim
Class JSlimQueue

java.lang.Object
  extended bycom.gtcgroup.jslim.JSlimQueue
All Implemented Interfaces:
javax.jms.Destination, IJSlimCachable, javax.jms.Queue

class JSlimQueue
extends java.lang.Object
implements javax.jms.Queue, IJSlimCachable

This class wraps a Queue in order to intercept methods throwing a JMSException. If an exception is thrown all cached objects are discarded preventing further use. The typical scenario supported is the unavailability of a previously available resource.

Copyright (c) 1999 - 2004 by Global Technology Consulting Group, Inc. at gtcGroup.com.
Use is authorized, provided the source is acknowledged by inclusion of this copyright notice.

Since:
v. 1.0
Author:
MDT (MarvinToll@gtcGroup.com)

Field Summary
private  int intUrlSelected
          Identifies which of the descriptor document URLs were used to obtain the initial context for the instantiation of this object.
private  javax.jms.Queue queue
          A Queue object encapsulates a provider-specific queue name.
 
Constructor Summary
JSlimQueue(javax.jms.Queue queue, int intURLSelected)
          Constructor.
 
Method Summary
 java.lang.String getQueueName()
          Gets the name of this queue.
 int getUrlSelected()
          Identifies which of the descriptor document URLs were used to obtain the initial context for the instantiation of this object.
private static java.lang.Object rethrowJMSException(javax.jms.JMSException e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.jms.Queue
toString
 

Field Detail

queue

private final javax.jms.Queue queue
A Queue object encapsulates a provider-specific queue name. It is the way a client specifies the identity of a queue to JMS API methods.


intUrlSelected

private final int intUrlSelected
Identifies which of the descriptor document URLs were used to obtain the initial context for the instantiation of this object.

Constructor Detail

JSlimQueue

public JSlimQueue(javax.jms.Queue queue,
                  int intURLSelected)
Constructor.

Parameters:
queue - A Queue object encapsulates a provider-specific queue name. It is the way a client specifies the identity of a queue to JMS API methods.
intURLSelected - Identifies which of the descriptor document URLs were used to obtain the initial context for the instantiation of this object.
Method Detail

getUrlSelected

public final int getUrlSelected()
Identifies which of the descriptor document URLs were used to obtain the initial context for the instantiation of this object.

Specified by:
getUrlSelected in interface IJSlimCachable
Returns:
Which of the descriptor document URLs were used to obtain the initial context for the instantiation of this object.

getQueueName

public java.lang.String getQueueName()
                              throws javax.jms.JMSException
Gets the name of this queue.

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

rethrowJMSException

private static java.lang.Object rethrowJMSException(javax.jms.JMSException e)
                                             throws javax.jms.JMSException
Throws:
javax.jms.JMSException

JSlim  


Copyright (c) 1999 - 2004 by Global Technology Consulting Group, Inc. at gtcGroup.com.
Use is authorized, provided the source is acknowledged by inclusion of this copyright notice.