org.objectweb.joram.client.jms

Class Topic

Implemented Interfaces:
javax.jms.Destination, javax.naming.Referenceable, java.io.Serializable, javax.jms.Topic, SoapObjectItf
Known Direct 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(String agentId)
Constructs a topic.
Topic(String agentId, String name)
Constructs a topic.

Method Summary

static Topic
create()
Admin method creating and deploying a topic on the local server.
static Topic
create(String name)
Admin method creating and deploying (or retrieving) 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, Properties prop)
Admin method creating and deploying a topic on a given server.
static Topic
create(int serverId, String name)
Admin method creating and deploying (or retrieving) a topic on a given server with a given name.
static Topic
create(int serverId, String className, Properties prop)
Admin method creating and deploying a topic on a given server.
static Topic
create(int serverId, String name, String className, Properties prop)
Admin method creating and deploying (or retrieving) a topic on a given server.
Object
decode(Hashtable h)
Decodes a Topic which traveled through the SOAP protocol.
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.
String
getTopicName()
API method.
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

code, getInstance, getReference

Constructor Details

Topic

public Topic()
Constructs an empty topic.


Topic

public Topic(String agentId)
Constructs a topic.

Parameters:
agentId - Identifier of the topic agent.


Topic

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

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

Method Details

create

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

The request fails if the destination deployement fails server side.

Throws:
AdminException - If the request fails.


create

public static Topic create(String name)
            throws 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:
AdminException - If the request fails.


create

public static Topic create(int serverId)
            throws 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:
AdminException - If the request fails.


create

public static Topic create(int serverId,
                           Properties prop)
            throws 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:
AdminException - If the request fails.


create

public static Topic create(int serverId,
                           String name)
            throws 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:
AdminException - If the request fails.


create

public static Topic create(int serverId,
                           String className,
                           Properties prop)
            throws 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:
AdminException - If the request fails.


create

public static Topic create(int serverId,
                           String name,
                           String className,
                           Properties prop)
            throws 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:
AdminException - If the request fails.


decode

public Object decode(Hashtable h)
Decodes a Topic which traveled through the SOAP protocol.
Specified by:
decode in interface SoapObjectItf


getClusterFellows

public List getClusterFellows()
            throws 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:
AdminException - If the request fails.


getHierarchicalFather

public Topic getHierarchicalFather()
            throws 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:
AdminException - If the request fails.


getSubscriptions

public int getSubscriptions()
            throws 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:
AdminException - If the request fails.


getTopicName

public String getTopicName()
            throws JMSException
API method.


toString

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


Copyright B) 2004 Scalagent - All rights reserved