JSlim  


com.gtcgroup.jslim
Class JSlimTopic

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

final class JSlimTopic
extends java.lang.Object
implements javax.jms.Topic, IJSlimCachable

This class wraps a Topic 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.Topic topic
          A Topic object encapsulates a provider-specific topic name.
 
Constructor Summary
JSlimTopic(javax.jms.Topic topic, int intURLSelected)
          Constructor.
 
Method Summary
 java.lang.String getTopicName()
          Gets the name of this topic.
 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.Topic
toString
 

Field Detail

topic

private final javax.jms.Topic topic
A Topic object encapsulates a provider-specific topic name. It is the way a client specifies the identity of a topic 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

JSlimTopic

public JSlimTopic(javax.jms.Topic topic,
                  int intURLSelected)
Constructor.

Parameters:
topic - A Topic object encapsulates a provider-specific topic name. It is the way a client specifies the identity of a topic 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.

getTopicName

public final java.lang.String getTopicName()
                                    throws javax.jms.JMSException
Gets the name of this topic.

Clients that depend upon the name are not portable.

Specified by:
getTopicName in interface javax.jms.Topic
Returns:
the topic name
Throws:
javax.jms.JMSException - if the JMS provider implementation of Topic fails to return the topic 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.