public class Topic extends Destination implements Topic, TopicMBean
javax.jms.Topic
interface.
This is a proxy object a client uses to specify the destination of messages it is sending and the source of messages it receives.
The Topic class is a factory for Joram's Topic destination through the create static methods, the Topic object provides Joram specific administration and monitoring methods.
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID
define serialVersionUID for interoperability
|
ACQUISITION_QUEUE, ACQUISITION_TOPIC, adminName, agentId, ALIAS_QUEUE, CLUSTER_QUEUE, DEAD_MQUEUE, DISTRIBUTION_QUEUE, DISTRIBUTION_TOPIC, FTP_QUEUE, JMXBeanName, logger, QUEUE, QUEUE_TYPE, SCHEDULER_QUEUE, TEMPORARY, TOPIC, TOPIC_TYPE, wrapper
Modifier | Constructor and Description |
---|---|
|
Topic() |
|
Topic(String id) |
protected |
Topic(String id,
byte type) |
Modifier and Type | Method and Description |
---|---|
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,
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.
|
static Topic |
create(String name)
Admin method creating and deploying (or retrieving) a topic on the
local server.
|
static Topic |
createTopic(String agentId,
String name) |
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.
|
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.
|
String |
getTopicName()
API method.
|
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.
|
String |
toString()
Returns a String image of the topic.
|
void |
unsetParent()
Unsets the father of this topic.
|
addInterceptor, addInterceptors, addReader, addWriter, check, checkId, delete, doCreate, doRequest, equals, fromReference, getAdminName, getDMQ, getDMQId, getInterceptors, getJMXBeanName, getName, getReaderList, getReaders, getStatistic, getStatistics, getStatistics, getType, getWrapper, getWriterList, getWriters, hashCode, isFreelyReadable, isFreelyWriteable, isQueue, isTopic, newInstance, registerMBean, removeInterceptors, removeReader, removeWriter, replaceInterceptor, replaceInterceptor, scale, setDMQ, setDMQId, setFreelyReadable, setFreelyWriteable, setFreeReading, setFreeWriting, setProperties, setReader, setWrapper, setWriter, toReference, toXml, unregisterMBean, unsetFreeReading, unsetFreeWriting, unsetReader, unsetWriter
getReference
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addInterceptors, addReader, addWriter, delete, getAdminName, getDMQId, getInterceptors, getName, getReaderList, getStatistic, getStatistics, getWriterList, isFreelyReadable, isFreelyWriteable, isQueue, isTopic, removeInterceptors, removeReader, removeWriter, setDMQId, setFreelyReadable, setFreelyWriteable
private static final long serialVersionUID
public Topic()
public Topic(String id)
protected Topic(String id, byte type)
public String toString()
public String getTopicName() throws JMSException
getTopicName
in interface Topic
JMSException
- Actually never thrown.public static Topic create(int serverId, String name, String className, Properties prop) throws 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.ConnectException
- If the admin connection is closed or broken.AdminException
- If the request fails.public static Topic create(int serverId, String className, Properties prop) throws 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.ConnectException
- If the admin connection is closed or broken.AdminException
- If the request fails.public static Topic create(int serverId, Properties prop) throws 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.ConnectException
- If the admin connection is closed or broken.AdminException
- If the request fails.public static Topic create(int serverId, String name) throws 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.ConnectException
- If the admin connection is closed or broken.AdminException
- If the request fails.public static Topic create(String name) throws 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.ConnectException
- If the admin connection is closed or broken.AdminException
- If the request fails.public static Topic create(int serverId) throws 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.ConnectException
- If the admin connection is closed or broken.AdminException
- If the request fails.public static Topic create() throws ConnectException, AdminException
The request fails if the destination deployment fails server side.
Be careful this method use the static AdminModule connection.
ConnectException
- If the admin connection is closed or broken.AdminException
- If the request fails.public Topic getHierarchicalFather() throws ConnectException, AdminException
The request fails if the topic is deleted server side.
ConnectException
- If the admin connection is closed or broken.AdminException
- If the request fails.public List getClusterFellows() throws ConnectException, AdminException
The request fails if the topic is deleted server side.
ConnectException
- If the admin connection is closed or broken.AdminException
- If the request fails.public int getSubscriptions() throws ConnectException, AdminException
The request fails if the topic is deleted server side.
getSubscriptions
in interface TopicMBean
ConnectException
- If the admin connection is closed or broken.AdminException
- If the request fails.public String[] getSubscriberIds() throws AdminException, ConnectException
TopicMBean
getSubscriberIds
in interface TopicMBean
AdminException
ConnectException
public void addClusteredTopic(Topic addedTopic) throws 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 clusterConnectException
- If the admin connection is closed or broken.AdminException
- If the request fails.public void removeFromCluster() throws ConnectException, AdminException
The request fails if the topic does not exist or is not part of any cluster.
ConnectException
- If the admin connection is closed or broken.AdminException
- If the request fails.public void setParent(Topic parent) throws 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.ConnectException
- If the admin connection is closed or broken.AdminException
- If the request fails.public void unsetParent() throws ConnectException, AdminException
The request fails if the topic does not exist or is not part of any hierarchy.
ConnectException
- If the admin connection is closed or broken.AdminException
- If the request fails.Copyright © 2019 ScalAgent D.T.. All rights reserved.