Package com.tibco.tibjms.admin
Class TopicInfo
- java.lang.Object
-
- com.tibco.tibjms.admin.DestinationInfo
-
- com.tibco.tibjms.admin.TopicInfo
-
public class TopicInfo extends DestinationInfo
This class represents a topic that is configured on the EMS server.
-
-
Field Summary
-
Fields inherited from class com.tibco.tibjms.admin.DestinationInfo
ALL_TYPE, DEST_GET_ALL, DEST_GET_DYNAMIC, DEST_GET_NOTEMP, DEST_GET_STATIC, MSG_TRACE_BASIC, MSG_TRACE_DETAIL, MSG_TRACE_NONE, OVERFLOW_DEFAULT, OVERFLOW_DISCARD_OLD, OVERFLOW_REJECT_INCOMING, PREFETCH_DEFAULT, PREFETCH_NONE, QUEUE_TYPE, TOPIC_TYPE
-
-
Constructor Summary
Constructors Constructor Description TopicInfo(java.lang.String topicName)
The public constructor creates a TopicInfo object with the given name.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addExportTransport(java.lang.String transportName)
Add a new export transport to the list of transports this destination exports messages to.boolean
areExportTransportsInherited()
Deprecated.This method has been misnamed and replaced byisExportTransportsInherited()
.static TopicInfo
from(javax.management.openmbean.CompositeData cd)
For Internal use only, may be removed or deprecated in future.int
getActiveDurableCount()
Get the current number of active durable consumers for this topic.java.lang.String
getChannel()
Deprecated.As of release 8.3int
getDurableCount()
Deprecated.UsegetDurableSubscriptionCount()
instead.int
getDurableSubscriptionCount()
Get the current number of durable subscriptions for this topic.java.lang.String[]
getExportTransports()
Get the names of the transports that this topic exports messages on.int
getSubscriberCount()
Get the current number of active subscribers for this topic.int
getSubscriptionCount()
Get the current number of subscriptions for this topic.boolean
isChannelInherited()
Deprecated.As of release 8.3boolean
isExportTransportsInherited()
Determines if the list of transports this topic exports messages on was inherited from a parent topic or whether it was set on the topic directly.boolean
isMulticastEnabled()
Deprecated.As of release 8.3void
removeExportTransport(java.lang.String transportName)
Remove an export transport from the list of transports this destination exports messages to.void
setChannel(java.lang.String channel)
Deprecated.As of release 8.3java.lang.String
toString()
-
Methods inherited from class com.tibco.tibjms.admin.DestinationInfo
addImportTransport, areBridgeTargetsInherited, areImportTransportsInherited, connectionID, getBridgeTargets, getConsumerCount, getDescription, getExpiryOverride, getFlowControlMaxBytes, getImportTransports, getInboundStatistics, getJNDINames, getMaxBytes, getMaxMsgs, getMsgTrace, getName, getOutboundStatistics, getOverflowPolicy, getPendingMessageCount, getPendingMessageSize, getPendingPersistentMessageCount, getPendingPersistentMessageSize, getPrefetch, getRedeliveryDelay, getStore, isBridgeTargetsInherited, isExpiryOverrideInherited, isFailsafe, isFailsafeInherited, isFlowControlMaxBytesInherited, isGlobal, isGlobalInherited, isImportTransportsInherited, isMaxBytesInherited, isMaxMsgsInherited, isMsgTraceInherited, isOverflowPolicyInherited, isPrefetchInherited, isRedeliveryDelayInherited, isSecure, isSecureInherited, isSenderName, isSenderNameEnforced, isSenderNameEnforcedInherited, isSenderNameInherited, isStatic, isStoreInherited, isTemporary, removeImportTransport, setDescription, setExpiryOverride, setFailsafe, setFlowControlMaxBytes, setGlobal, setMaxBytes, setMaxMsgs, setMsgTrace, setOverflowPolicy, setPrefetch, setRedeliveryDelay, setSecure, setSenderName, setSenderNameEnforced, setStore, statString
-
-
-
-
Constructor Detail
-
TopicInfo
public TopicInfo(java.lang.String topicName)
The public constructor creates a TopicInfo object with the given name. The topic is not created on the server until the object is passed to TibjmsAdmin.createTopic().- Parameters:
topicName
- The name for the topic being created.
-
-
Method Detail
-
getExportTransports
public java.lang.String[] getExportTransports()
Get the names of the transports that this topic exports messages on.- Returns:
- array of transport names.
-
areExportTransportsInherited
@Deprecated public boolean areExportTransportsInherited()
Deprecated.This method has been misnamed and replaced byisExportTransportsInherited()
.
-
isExportTransportsInherited
public boolean isExportTransportsInherited()
Determines if the list of transports this topic exports messages on was inherited from a parent topic or whether it was set on the topic directly.- Returns:
- true if transport list is inherited from parent, false otherwise.
- Since:
- EMS 4.4
-
addExportTransport
public void addExportTransport(java.lang.String transportName) throws TibjmsAdminInvalidNameException
Add a new export transport to the list of transports this destination exports messages to. If the current list of transports has been inherited from a parent topic then adding a transport will stop the inheritance and the inherited transports will all be removed from the list and replaced with the new one. From then on isExportTransportsInherited will indicate that the transports are no longer inherited and future calls to addExportTransport will simply add new transports to the list.- Parameters:
transportName
- the name of the transport.- Throws:
TibjmsAdminInvalidNameException
- if transportName is not a legal transport name
-
removeExportTransport
public void removeExportTransport(java.lang.String transportName) throws TibjmsAdminInvalidNameException, TibjmsAdminException
Remove an export transport from the list of transports this destination exports messages to. The removal of a transport from the list if the transports is inherited from a parent topic is not permitted and results in an exception.- Parameters:
transportName
- the name of the transport.- Throws:
TibjmsAdminInvalidNameException
- if transportName is not a legal transport nameTibjmsAdminException
- if export transports is inherited
-
getSubscriptionCount
public int getSubscriptionCount()
Get the current number of subscriptions for this topic. This value is correct when this TopicInfo was retrieved from the server through TibjmsAdmin methods. It is never updated. To get an updated value, a new TopicInfo must be retrieved from the server.- Returns:
- the number of subscriptions for this topic when the TopicInfo was retrieved from the server.
- Since:
- EMS 8.0
-
getDurableSubscriptionCount
public int getDurableSubscriptionCount()
Get the current number of durable subscriptions for this topic. This value is correct when this TopicInfo was retrieved from the server through TibjmsAdmin methods. It is never updated. To get an updated value, a new TopicInfo must be retrieved from the server.- Returns:
- the number of durable subscriptions for this topic when the TopicInfo was retrieved from the server.
- Since:
- EMS 8.0
-
getSubscriberCount
public int getSubscriberCount()
Get the current number of active subscribers for this topic. This value is correct when this TopicInfo was retrieved from the server through TibjmsAdmin methods. It is never updated. To get an updated value, a new TopicInfo must be retrieved from the server.- Returns:
- the number of active subscribers for this topic when the TopicInfo was retrieved from the server.
-
getDurableCount
@Deprecated public int getDurableCount()
Deprecated.UsegetDurableSubscriptionCount()
instead.Get the current number of durable subscriptions for this topic. This value is correct when this TopicInfo was retrieved from the server through TibjmsAdmin methods. It is never updated. To get an updated value, a new TopicInfo must be retrieved from the server.- Returns:
- the number of durable subscriptions for this topic when the TopicInfo was retrieved from the server.
-
getActiveDurableCount
public int getActiveDurableCount()
Get the current number of active durable consumers for this topic. This value is correct when this TopicInfo was retrieved from the server through TibjmsAdmin methods. It is never updated. To get an updated value, a new TopicInfo must be retrieved from the server.- Returns:
- the number of active durable consumers for this topic when the TopicInfo was retrieved from the server.
-
setChannel
@Deprecated public void setChannel(java.lang.String channel)
Deprecated.As of release 8.3Set the multicast channel for this topic.- Parameters:
channel
- the multicast channel for this topic,null
or empty to remove the multicast channel.- Since:
- EMS 5.0
-
getChannel
@Deprecated public java.lang.String getChannel()
Deprecated.As of release 8.3Get the multicast channel for this topic.- Returns:
- the multicast channel for this topic.
- Since:
- EMS 5.0
-
isChannelInherited
@Deprecated public boolean isChannelInherited()
Deprecated.As of release 8.3Determine if the channel property was inherited from a parent topic or set directly for this topic.- Returns:
true
if the channel property is inherited.- Since:
- EMS 5.0
-
isMulticastEnabled
@Deprecated public boolean isMulticastEnabled()
Deprecated.As of release 8.3Determine if this topic is multicast-enabled. A topic is multicast-enabled when its channel property is set or inherited and the server is multicast-enabled.- Returns:
true
if this topic is multicast-enabled.- Since:
- EMS 5.0
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
from
public static TopicInfo from(javax.management.openmbean.CompositeData cd) throws java.lang.Exception
For Internal use only, may be removed or deprecated in future.- Returns:
- a TopicInfo object from CompositeData
- Throws:
java.lang.IllegalArgumentException
- if CompositeType does not match or if a null CompositeData is passed.java.lang.Exception
-
-