|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.joram.client.jms.admin.AdministeredObject
org.objectweb.joram.client.jms.Destination
org.objectweb.joram.client.jms.Topic
public class Topic
Implements the javax.jms.Topic
interface and provides
Joram specific administration and monitoring methods. This is a proxy
object a client uses to specify the destination of messages it is
sending and the source of messages it receives.
Field Summary |
---|
Fields inherited from class org.objectweb.joram.client.jms.Destination |
---|
ACQUISITION_QUEUE, ACQUISITION_TOPIC, adminName, agentId, CLUSTER_QUEUE, DEAD_MQUEUE, DISTRIBUTION_QUEUE, DISTRIBUTION_TOPIC, JMXBeanName, logger, QUEUE, QUEUE_TYPE, SCHEDULER_QUEUE, TEMPORARY, TOPIC, TOPIC_TYPE |
Constructor Summary | |
---|---|
|
Topic()
|
|
Topic(java.lang.String id)
|
protected |
Topic(java.lang.String id,
byte type)
|
Method Summary | |
---|---|
void |
addClusteredTopic(Topic addedTopic)
Adds a topic into the cluster this topic belongs to. |
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. |
static Topic |
createTopic(java.lang.String agentId,
java.lang.String name)
|
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. |
java.lang.String[] |
getSubscriberIds()
Monitoring method returning an array containing the ids of users that subscribes on this topic. |
int |
getSubscriptions()
Monitoring method returning the number of users that subscribes on this topic. |
java.lang.String |
getTopicName()
Gets the The Joram's internal unique identifier of this topic. |
void |
removeFromCluster()
Removes this topic from the cluster it belongs to. |
void |
setParent(Topic parent)
Creates a hierarchical relationship between this topic and its father topic. |
java.lang.String |
toString()
Returns a String image of the topic. |
void |
unsetParent()
Unsets the father of this topic. |
Methods inherited from class org.objectweb.joram.client.jms.Destination |
---|
addInterceptors, addReader, addWriter, check, checkId, code, decode, delete, doCreate, doRequest, equals, fromReference, getAdminName, getDMQ, getDMQId, getInterceptors, getJMXBeanName, getName, getReaderList, getReaders, getStatistic, getStatistics, getType, getWrapper, getWriterList, getWriters, hashCode, isFreelyReadable, isFreelyWriteable, isQueue, isTopic, newInstance, registerMBean, removeInterceptors, removeReader, removeWriter, replaceInterceptor, setDMQ, setDMQId, setFreelyReadable, setFreelyWriteable, setFreeReading, setFreeWriting, setProperties, setReader, setWrapper, setWriter, toReference, toXml, unregisterMBean, unsetFreeReading, unsetFreeWriting, unsetReader, unsetWriter |
Methods inherited from class org.objectweb.joram.client.jms.admin.AdministeredObject |
---|
getReference |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.objectweb.joram.client.jms.DestinationMBean |
---|
addInterceptors, addReader, addWriter, delete, getAdminName, getDMQId, getInterceptors, getName, getReaderList, getStatistic, getStatistics, getWriterList, isFreelyReadable, isFreelyWriteable, isQueue, isTopic, removeInterceptors, removeReader, removeWriter, setDMQId, setFreelyReadable, setFreelyWriteable |
Constructor Detail |
---|
public Topic()
public Topic(java.lang.String id)
protected Topic(java.lang.String id, byte type)
Method Detail |
---|
public java.lang.String toString()
toString
in interface javax.jms.Topic
toString
in class java.lang.Object
public java.lang.String getTopicName() throws javax.jms.JMSException
getTopicName
in interface javax.jms.Topic
javax.jms.JMSException
- Actually never thrown.public static Topic createTopic(java.lang.String agentId, java.lang.String name)
public static Topic create(int serverId, java.lang.String name, java.lang.String className, java.util.Properties prop) throws java.net.ConnectException, AdminException
The request fails if the target server does not belong to the platform, or if the destination deployment fails server side.
Be careful this method use the static AdminModule connection.
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.
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.public static Topic create(int serverId, java.lang.String className, java.util.Properties prop) throws java.net.ConnectException, AdminException
The request fails if the target server does not belong to the platform, or if the destination deployment fails server side.
Be careful this method use the static AdminModule connection.
serverId
- The identifier of the server where deploying the topic.className
- The topic class name.prop
- The topic properties.
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.public static Topic create(int serverId, java.util.Properties prop) throws java.net.ConnectException, AdminException
The request fails if the target server does not belong to the platform, or if the destination deployment fails server side.
Be careful this method use the static AdminModule connection.
serverId
- The identifier of the server where deploying the topic.prop
- The topic properties.
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.public static Topic create(int serverId, java.lang.String name) throws java.net.ConnectException, AdminException
The request fails if the target server does not belong to the platform, or if the destination deployment fails server side.
Be careful this method use the static AdminModule connection.
serverId
- The identifier of the server where deploying the topic.name
- The topic name.
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.public static Topic create(java.lang.String name) throws java.net.ConnectException, AdminException
The request fails if the destination deployment fails server side.
Be careful this method use the static AdminModule connection.
name
- The topic name.
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.public static Topic create(int serverId) throws java.net.ConnectException, AdminException
The request fails if the target server does not belong to the platform, or if the destination deployment fails server side.
Be careful this method use the static AdminModule connection.
serverId
- The identifier of the server where deploying the topic.
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.public static Topic create() throws java.net.ConnectException, AdminException
The request fails if the destination deployment fails server side.
Be careful this method use the static AdminModule connection.
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.public Topic getHierarchicalFather() throws java.net.ConnectException, AdminException
The request fails if the topic is deleted server side.
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.public java.util.List getClusterFellows() throws java.net.ConnectException, AdminException
The request fails if the topic is deleted server side.
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.public int getSubscriptions() throws java.net.ConnectException, AdminException
The request fails if the topic is deleted server side.
getSubscriptions
in interface TopicMBean
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.public java.lang.String[] getSubscriberIds() throws AdminException, java.net.ConnectException
TopicMBean
getSubscriberIds
in interface TopicMBean
AdminException
java.net.ConnectException
public void addClusteredTopic(Topic addedTopic) throws java.net.ConnectException, AdminException
The request fails if one or both of the topics are deleted, or can't belong to a cluster.
addedTopic
- topic added to the cluster
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.public void removeFromCluster() throws java.net.ConnectException, AdminException
The request fails if the topic does not exist or is not part of any cluster.
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.public void setParent(Topic parent) throws java.net.ConnectException, AdminException
The request fails if one of the topics does not exist or can't be part of a hierarchy.
parent
- the topic which will be parent. null to remove previous parent.
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.public void unsetParent() throws java.net.ConnectException, AdminException
The request fails if the topic does not exist or is not part of any hierarchy.
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |