org.objectweb.joram.client.jms
Class Topic

java.lang.Object
  extended byorg.objectweb.joram.client.jms.admin.AdministeredObject
      extended byorg.objectweb.joram.client.jms.Destination
          extended byorg.objectweb.joram.client.jms.Topic
All Implemented Interfaces:
javax.jms.Destination, javax.naming.Referenceable, java.io.Serializable, SoapObjectItf, javax.jms.Topic
Direct Known Subclasses:
TemporaryTopic

public class Topic
extends Destination
implements javax.jms.Topic

Implements the javax.jms.Topic interface and provides JORAM specific administration and monitoring methods.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.objectweb.joram.client.jms.Destination
adminName, agentId
 
Fields inherited from class org.objectweb.joram.client.jms.admin.AdministeredObject
id, instancesTable
 
Constructor Summary
Topic()
          Constructs an empty topic.
Topic(java.lang.String agentId)
          Constructs a topic.
Topic(java.lang.String agentId, java.lang.String name)
          Constructs a topic.
 
Method Summary
static Topic create()
          Admin method creating and deploying a topic on the local server.
static Topic create(int serverId)
          Admin method creating and deploying a topic on a given server.
static Topic create(int serverId, java.util.Properties prop)
          Admin method creating and deploying a topic on a given server.
static Topic create(int serverId, java.lang.String name)
          Admin method creating and deploying (or retrieving) a topic on a given server with a given name.
static Topic create(int serverId, java.lang.String className, java.util.Properties prop)
          Admin method creating and deploying a topic on a given server.
static Topic create(int serverId, java.lang.String name, java.lang.String className, java.util.Properties prop)
          Admin method creating and deploying (or retrieving) a topic on a given server.
static Topic create(java.lang.String name)
          Admin method creating and deploying (or retrieving) a topic on the local server.
 java.lang.Object decode(java.util.Hashtable h)
          Decodes a Topic which traveled through the SOAP protocol.
 java.util.List getClusterFellows()
          Monitoring method returning the list describing the cluster this topic is part of.
 Topic getHierarchicalFather()
          Monitoring method returning the hierarchical father of this topic, null if none.
 int getSubscriptions()
          Monitoring method returning the number of users that subscribes on this topic.
 java.lang.String getTopicName()
          API method.
 java.lang.String toString()
          Returns a String image of the topic.
 
Methods inherited from class org.objectweb.joram.client.jms.Destination
code, delete, doCreate, equals, getAdminName, getDMQ, getName, getReaders, getReference, getWriters, isFreelyReadable, isFreelyWriteable, isQueue, setDMQ, setFreeReading, setFreeWriting, setReader, setWriter, unsetFreeReading, unsetFreeWriting, unsetReader, unsetWriter
 
Methods inherited from class org.objectweb.joram.client.jms.admin.AdministeredObject
getInstance
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Topic

public Topic(java.lang.String agentId)
Constructs a topic.

Parameters:
agentId - Identifier of the topic agent.

Topic

public Topic(java.lang.String agentId,
             java.lang.String name)
Constructs a topic.

Parameters:
agentId - Identifier of the topic agent.
name - Name set by administrator.

Topic

public Topic()
Constructs an empty topic.

Method Detail

toString

public java.lang.String toString()
Returns a String image of the topic.

Specified by:
toString in interface javax.jms.Topic

getTopicName

public java.lang.String getTopicName()
                              throws javax.jms.JMSException
API method.

Specified by:
getTopicName in interface javax.jms.Topic
Throws:
javax.jms.JMSException - Actually never thrown.

decode

public java.lang.Object decode(java.util.Hashtable h)
Decodes a Topic which traveled through the SOAP protocol.

Specified by:
decode in interface SoapObjectItf

create

public static Topic create(int serverId,
                           java.lang.String name,
                           java.lang.String className,
                           java.util.Properties prop)
                    throws java.net.ConnectException,
                           AdminException
Admin method creating and deploying (or retrieving) a topic on a given server.

The request fails if the target server does not belong to the platform, or if the destination deployement fails server side.

Parameters:
serverId - The identifier of the server where deploying the topic.
name - The name of the topic.
className - The topic class name.
prop - The topic properties.
Throws:
java.net.ConnectException - If the admin connection is closed or broken.
AdminException - If the request fails.

create

public static Topic create(int serverId,
                           java.lang.String className,
                           java.util.Properties prop)
                    throws java.net.ConnectException,
                           AdminException
Admin method creating and deploying a topic on a given server.

The request fails if the target server does not belong to the platform, or if the destination deployement fails server side.

Parameters:
serverId - The identifier of the server where deploying the topic.
className - The topic class name.
prop - The topic properties.
Throws:
java.net.ConnectException - If the admin connection is closed or broken.
AdminException - If the request fails.

create

public static Topic create(int serverId,
                           java.util.Properties prop)
                    throws java.net.ConnectException,
                           AdminException
Admin method creating and deploying a topic on a given server.

The request fails if the target server does not belong to the platform, or if the destination deployement fails server side.

Parameters:
serverId - The identifier of the server where deploying the topic.
prop - The topic properties.
Throws:
java.net.ConnectException - If the admin connection is closed or broken.
AdminException - If the request fails.

create

public static Topic create(int serverId,
                           java.lang.String name)
                    throws java.net.ConnectException,
                           AdminException
Admin method creating and deploying (or retrieving) a topic on a given server with a given name.

The request fails if the target server does not belong to the platform, or if the destination deployement fails server side.

Parameters:
serverId - The identifier of the server where deploying the topic.
name - The topic name.
Throws:
java.net.ConnectException - If the admin connection is closed or broken.
AdminException - If the request fails.

create

public static Topic create(java.lang.String name)
                    throws java.net.ConnectException,
                           AdminException
Admin method creating and deploying (or retrieving) a topic on the local server.

The request fails if the destination deployement fails server side.

Parameters:
name - The topic name.
Throws:
java.net.ConnectException - If the admin connection is closed or broken.
AdminException - If the request fails.

create

public static Topic create(int serverId)
                    throws java.net.ConnectException,
                           AdminException
Admin method creating and deploying a topic on a given server.

The request fails if the target server does not belong to the platform, or if the destination deployement fails server side.

Parameters:
serverId - The identifier of the server where deploying the topic.
Throws:
java.net.ConnectException - If the admin connection is closed or broken.
AdminException - If the request fails.

create

public static Topic create()
                    throws java.net.ConnectException,
                           AdminException
Admin method creating and deploying a topic on the local server.

The request fails if the destination deployement fails server side.

Throws:
java.net.ConnectException - If the admin connection is closed or broken.
AdminException - If the request fails.

getHierarchicalFather

public Topic getHierarchicalFather()
                            throws java.net.ConnectException,
                                   AdminException
Monitoring method returning the hierarchical father of this topic, null if none.

The request fails if the topic is deleted server side.

Throws:
java.net.ConnectException - If the admin connection is closed or broken.
AdminException - If the request fails.

getClusterFellows

public java.util.List getClusterFellows()
                                 throws java.net.ConnectException,
                                        AdminException
Monitoring method returning the list describing the cluster this topic is part of.

The request fails if the topic is deleted server side.

Throws:
java.net.ConnectException - If the admin connection is closed or broken.
AdminException - If the request fails.

getSubscriptions

public int getSubscriptions()
                     throws java.net.ConnectException,
                            AdminException
Monitoring method returning the number of users that subscribes on this topic. If a client has many subscriptions it is only counted once.

The request fails if the topic is deleted server side.

Throws:
java.net.ConnectException - If the admin connection is closed or broken.
AdminException - If the request fails.


Copyright ? 2004 Scalagent - All rights reserved