TIBCO Enterprise Message Service

com.tibco.tibjms.admin
Class TopicInfo

java.lang.Object
  extended by com.tibco.tibjms.admin.DestinationInfo
      extended by 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
TopicInfo(java.lang.String topicName)
          The public constructor creates a TopicInfo object with the given name.
 
Method Summary
 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 by isExportTransportsInherited().
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 subscribers for this topic.
 java.lang.String getChannel()
          Get the multicast channel for this topic.
 int getDurableCount()
          Get the current number of durable subscribers 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 subscribers for this topic.
 boolean isChannelInherited()
          Determine if the channel property was inherited from a parent topic or set directly for this topic.
 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.
 boolean isMulticastEnabled()
          Determine if this topic is multicast-enabled.
 void 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)
          Set the multicast channel for this topic.
 java.lang.String toString()
           
 
Methods inherited from class com.tibco.tibjms.admin.DestinationInfo
addImportTransport, areBridgeTargetsInherited, areImportTransportsInherited, 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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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

public boolean areExportTransportsInherited()
Deprecated. This method has been misnamed and replaced by isExportTransportsInherited().


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 name
TibjmsAdminException - if export transports is inherited

getSubscriberCount

public int getSubscriberCount()
Get the current number of 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 subscibers for this queue when the TopicInfo was retrieved from the server.

getDurableCount

public int getDurableCount()
Get the current number of durable 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 durable subscribers for this queue when the TopicInfo was retrieved from the server.

getActiveDurableCount

public int getActiveDurableCount()
Get the current number of active durable 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 durable subscribers for this queue when the TopicInfo was retrieved from the server.

setChannel

public void setChannel(java.lang.String channel)
Set 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

public java.lang.String getChannel()
Get the multicast channel for this topic.

Returns:
the multicast channel for this topic.
Since:
EMS 5.0

isChannelInherited

public boolean isChannelInherited()
Determine 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

public boolean isMulticastEnabled()
Determine 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 class java.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

TIBCO Enterprise Message Service

Copyright © TIBCO Software Inc. All rights reserved