TIBCO Enterprise Message Service
Version 4.3.0

com.tibco.tibjms.admin
Class RouteInfo

java.lang.Object
  extended bycom.tibco.tibjms.admin.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
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
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.
 
Method Summary
 void addIncomingSelector(RouteSelector rs)
          Add a new incoming selector to the route.
 void addOutgoingSelector(RouteSelector rs)
          Add a new outgoing selector to the route.
 long getConnectionID()
          Returns connection ID of this route or 0 if route is not connected.
 DetailedDestStat[] getDetailedStatistics()
          Returns detailed destination statistics for all destinations being sent to or received from this route.
 StatData getInboundStatistics()
          Returns cumulative inbound statistics for all destinations on this route.
 RouteSelector[] getIncomingSelectors()
          Get the selectors that will be run on messages received by this route.
 java.lang.String getName()
          Get the name of the remote server in this route.
 StatData getOutboundStatistics()
          Returns cumulative outbound statistics for all destinations on this route.
 RouteSelector[] getOutgoingSelectors()
          Get the selectors that will be run on messages before they are sent to this route.
 java.util.Map getParams()
          Get the SSL parameters for the connection to the remote server.
 java.lang.String getURL()
          Get the URL of the remote server in this route.
 java.lang.String getZoneName()
          Get the name of the zone this route is in.
 short getZoneType()
          Get the type of zone this route is in.
 boolean isConfigured()
          Indicates whether or not the route is defined in the server configuration.
 boolean isConnected()
          Indicates whether or not the route is connected.
 boolean isStalled()
          Indicates whether or not this route has stalled destinations.
 void removeIncomingSelector(java.lang.String topic)
          Remove the incoming selector on a given topic.
 void removeOutgoingSelector(java.lang.String topic)
          Remove the outgoing selector on a given topic.
 void setName(java.lang.String name)
          Set the name of the remote server in this route.
 void setSSLParams(java.util.Map params)
          Set the SSL parameters for the connection to the remote server.
 void setURL(java.lang.String url)
          Set the URL of the remote server in this route.
 java.lang.String statString()
          Helper method to generate the statistical information in string form.
 java.lang.String toString()
           
 void updateIncomingSelector(RouteSelector rs)
          Replace the current incoming selector on a given topic with a new one.
 void updateOutgoingSelector(RouteSelector rs)
          Replace the current outgoing selector on a given topic with a new one.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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.
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.


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.

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.

removeIncomingSelector

public void removeIncomingSelector(java.lang.String topic)
                            throws TibjmsAdminInvalidNameException
Remove the incoming selector on a given topic.

Parameters:
topic - the topic to remove the selector from.
Throws:
TibjmsAdminInvalidNameException - if topic is not a valid topic.

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.

removeOutgoingSelector

public void removeOutgoingSelector(java.lang.String topic)
                            throws TibjmsAdminInvalidNameException
Remove the outgoing selector on a given topic.

Parameters:
topic - the topic to remove the selector from.
Throws:
TibjmsAdminInvalidNameException - if topic is not a valid topic.

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()

statString

public java.lang.String statString()
Helper method to generate the statistical information in string form.

Returns:
a String representation of statistical information.

TIBCO Enterprise Message Service
Version 4.3.0

Copyright © TIBCO Software Inc. All rights reserved