Skip navigation links
TIBCO Enterprise Message Service
com.tibco.tibjms.admin

Class RouteInfo



  • public class RouteInfo
    extends java.lang.Object
    An object of this class represents the configuration and optionally statistical data about the routed server. When this object is received via the call to method TibjmsAdmin.getRoute(), it does not contain statistical information about the route. Only objects returned by method TibjmsAdmin.getRouteStatistics(name) return RouteInfo objects including all statistical data.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String DEFAULT_DAG_ZONE
      The name of the zone that routes are members of if no zone name is specified.
      static short ZONE_TYPE_MULTI_HOP
      A m-hop (Multi-Hop) zone is one in which topic messages can be routed across multiple hops and the routes between servers may not form a cycle.
      static short ZONE_TYPE_ONE_HOP
      A 1-Hop zone is one in which messages can be routed at most 1 hop away.
      static short ZONE_TYPE_UNKNOWN
      A zone of unknown type indicates some kind of error.
    • Constructor Summary

      Constructors 
      Constructor and Description
      RouteInfo(java.lang.String name, java.lang.String url, java.util.Map params)
      The public constructor used to create a RouteInfo object.
      RouteInfo(java.lang.String name, java.lang.String url, java.util.Map params, java.lang.String zoneName, short zoneType)
      The public constructor used to create a RouteInfo object that is part of a specific zone.
      RouteInfo(java.lang.String name, java.lang.String url, java.util.Map params, java.lang.String zoneName, short zoneType, int topicPrefetch)
      The public constructor used to create a RouteInfo object that is part of a specific zone.
    • Field Detail

      • ZONE_TYPE_MULTI_HOP

        public static final short ZONE_TYPE_MULTI_HOP
        A m-hop (Multi-Hop) zone is one in which topic messages can be routed across multiple hops and the routes between servers may not form a cycle.
        See Also:
        Constant Field Values
      • ZONE_TYPE_ONE_HOP

        public static final short ZONE_TYPE_ONE_HOP
        A 1-Hop zone is one in which messages can be routed at most 1 hop away. A typical 1-Hop zone is one in which every server has a route to every other server in the zone.
        See Also:
        Constant Field Values
      • ZONE_TYPE_UNKNOWN

        public static final short ZONE_TYPE_UNKNOWN
        A zone of unknown type indicates some kind of error.
        See Also:
        Constant Field Values
      • DEFAULT_DAG_ZONE

        public static final java.lang.String DEFAULT_DAG_ZONE
        The name of the zone that routes are members of if no zone name is specified. This zone is a DAG zone.
        See Also:
        Constant Field Values
    • Constructor Detail

      • RouteInfo

        public RouteInfo(java.lang.String name,
                         java.lang.String url,
                         java.util.Map params)
        The public constructor used to create a RouteInfo object. The route does not exist on the server until this RouteInfo is passed to TibjmsAdmin.createRoute(). The route created will be a member of the default DAG zone (DEFAULT_DAG_ZONE).
        Parameters:
        name - the name of the remote server that this route is to.
        url - the URL of the remote server.
        params - the SSL parameters for the connection to the remote server (can be null).
      • RouteInfo

        public RouteInfo(java.lang.String name,
                         java.lang.String url,
                         java.util.Map params,
                         java.lang.String zoneName,
                         short zoneType)
        The public constructor used to create a RouteInfo object that is part of a specific zone. The route does not exist on the server until this RouteInfo is passed to TibjmsAdmin.createRoute().
        Parameters:
        name - the name of the remote server that this route is to.
        url - the URL of the remote server.
        params - the SSL parameters for the connection to the remote server (can be null).
        zoneName - the name of the route's zone.
        zoneType - the type of routing in the zone, either ZONE_TYPE_MULTI_HOP or ZONE_TYPE_ONE_HOP.
      • RouteInfo

        public RouteInfo(java.lang.String name,
                         java.lang.String url,
                         java.util.Map params,
                         java.lang.String zoneName,
                         short zoneType,
                         int topicPrefetch)
        The public constructor used to create a RouteInfo object that is part of a specific zone. The route does not exist on the server until this RouteInfo is passed to TibjmsAdmin.createRoute().
        Parameters:
        name - the name of the remote server that this route is to.
        url - the URL of the remote server.
        params - the SSL parameters for the connection to the remote server (can be null).
        zoneName - the name of the route's zone.
        zoneType - the type of routing in the zone, either ZONE_TYPE_MULTI_HOP or ZONE_TYPE_ONE_HOP.
        topicPrefetch - the prefetch that overrides individual topic prefetches
        Since:
        EMS 8.1
    • Method Detail

      • isConfigured

        public boolean isConfigured()
        Indicates whether or not the route is defined in the server configuration. Note that if the route is not configured, its parameters can not be changed.
        Returns:
        true if this route is defined in the server configuration and, false if this route is not defined, but is present via a remote server connecting to this server.
      • isConnected

        public boolean isConnected()
        Indicates whether or not the route is connected.
        Returns:
        true if this route is connected and false if this route is defined in the server configuration but is not connected.
      • isStalled

        public boolean isStalled()
        Indicates whether or not this route has stalled destinations. Notice this flag is set if any number of destinations are stalled. It does not indicate if all destinations sent by this route are stalled.
        Returns:
        true if this route has any stalled destination, false otherwise.
      • getConnectionID

        public long getConnectionID()
        Returns connection ID of this route or 0 if route is not connected.
      • getBacklogCount

        public long getBacklogCount()
        Get the route's backlog count.
        Returns:
        the number of messages in the route's backlog
        Since:
        EMS 5.0
      • getBacklogSize

        public long getBacklogSize()
        Get the route's backlog size.
        Returns:
        the size of all messages in the route's backlog
        Since:
        EMS 5.0
      • getURL

        public java.lang.String getURL()
        Get the URL of the remote server in this route.
        Returns:
        the URL of the remote server in this route.
      • setURL

        public void setURL(java.lang.String url)
        Set the URL of the remote server in this route.
        Parameters:
        url - the URL of the remote server in this route.
      • getName

        public java.lang.String getName()
        Get the name of the remote server in this route.
        Returns:
        the name of the remote server in this route.
      • setName

        public void setName(java.lang.String name)
        Set the name of the remote server in this route. The name of existing route can not be changed. This method is used to create the new route.
        Parameters:
        name - the name of the remote server in this route.
      • getTopicPrefetch

        public int getTopicPrefetch()
        Get the topic prefetch of this route.
        Returns:
        the topic prefetch of this route.
        Since:
        EMS 8.1
      • setTopicPrefetch

        public void setTopicPrefetch(int prefetch)
        Set the topic prefetch of this route.
        Parameters:
        prefetch - the topic prefetch of this route.
        Since:
        EMS 8.1
      • getParams

        public java.util.Map getParams()
        Get the SSL parameters for the connection to the remote server.
        Returns:
        the SSL parameters for the connection to the remote server or null if none exist.
      • setSSLParams

        public void setSSLParams(java.util.Map params)
        Set the SSL parameters for the connection to the remote server.
        Parameters:
        params - the SSL parameters for the connection to the remote server.
      • getZoneName

        public java.lang.String getZoneName()
        Get the name of the zone this route is in.
        Returns:
        the name of the zone this route is in. For pre-3.2 servers this will be DEFAULT_DAG_ZONE.
      • getZoneType

        public short getZoneType()
        Get the type of zone this route is in.
        Returns:
        the type of zone this route is in. For pre-3.2 servers this will be ZONE_TYPE_MULTI_HOP.
      • getInboundStatistics

        public StatData getInboundStatistics()
        Returns cumulative inbound statistics for all destinations on this route. Inbound statistics refers to all messages this route sends to the connected server.
        Returns:
        the cumulative inbound statistics for all destinations on this route.
      • getOutboundStatistics

        public StatData getOutboundStatistics()
        Returns cumulative outbound statistics for all destinations on this route. Outbound data refers to all messages the server sends to this route.
        Returns:
        cumulative outbound statistics for all destinations on this route.
      • getDetailedStatistics

        public DetailedDestStat[] getDetailedStatistics()
        Returns detailed destination statistics for all destinations being sent to or received from this route.
        Returns:
        detailed destination statistics for all destinations being sent to or received from this route.
      • getIncomingSelectors

        public RouteSelector[] getIncomingSelectors()
        Get the selectors that will be run on messages received by this route. Only messages that match at least one of the selectors will be received by the route.
        Returns:
        an array of RouteSelector objects.
      • addIncomingSelector

        public void addIncomingSelector(RouteSelector rs)
                                 throws java.lang.IllegalArgumentException
        Add a new incoming selector to the route. If there is already a selector on that topic, the old one will be replaced by the new one.
        Parameters:
        rs - the new selector.
        Throws:
        java.lang.IllegalArgumentException - if rs is null.
      • updateIncomingSelector

        public void updateIncomingSelector(RouteSelector rs)
                                    throws java.lang.IllegalArgumentException
        Replace the current incoming selector on a given topic with a new one.
        Parameters:
        rs - the updated selector.
        Throws:
        java.lang.IllegalArgumentException - if rs is null.
      • getOutgoingSelectors

        public RouteSelector[] getOutgoingSelectors()
        Get the selectors that will be run on messages before they are sent to this route. Only messages that match at least one of the selectors will be forwarded by the route.
        Returns:
        an array of RouteSelector objects.
      • addOutgoingSelector

        public void addOutgoingSelector(RouteSelector rs)
                                 throws java.lang.IllegalArgumentException
        Add a new outgoing selector to the route. If there is already a selector on that topic, the old one will be replaced by the new one.
        Parameters:
        rs - the new selector.
        Throws:
        java.lang.IllegalArgumentException - if rs is null.
      • updateOutgoingSelector

        public void updateOutgoingSelector(RouteSelector rs)
                                    throws java.lang.IllegalArgumentException
        Replace the current outgoing selector on a given topic with a new one.
        Parameters:
        rs - the updated selector.
        Throws:
        java.lang.IllegalArgumentException - if rs is null.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • statString

        public java.lang.String statString()
        Helper method to generate the statistical information in string form.
        Returns:
        a String representation of statistical information.
      • from

        public static RouteInfo from(javax.management.openmbean.CompositeData cd)
                              throws java.lang.Exception
        For Internal use only, may be removed or deprecated in future.
        Returns:
        a RouteInfo 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 © Cloud Software Group, Inc. All rights reserved