Class TopicInfo


  • public class TopicInfo
    extends DestinationInfo
    This class represents a topic that is configured on the EMS server.
    • 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 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
      • 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.
        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.3
        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

        @Deprecated
        public java.lang.String getChannel()
        Deprecated.
        As of release 8.3
        Get 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.3
        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

        @Deprecated
        public boolean isMulticastEnabled()
        Deprecated.
        As of release 8.3
        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