Package com.tibco.tibjms.admin
Class RouteInfo
- java.lang.Object
- 
- com.tibco.tibjms.admin.RouteInfo
 
- 
 public class RouteInfo extends java.lang.ObjectAn 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 SummaryFields Modifier and Type Field Description static java.lang.StringDEFAULT_DAG_ZONEThe name of the zone that routes are members of if no zone name is specified.static shortZONE_TYPE_MULTI_HOPA 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 shortZONE_TYPE_ONE_HOPA 1-Hop zone is one in which messages can be routed at most 1 hop away.static shortZONE_TYPE_UNKNOWNA zone of unknown type indicates some kind of error.
 - 
Constructor SummaryConstructors Constructor Description RouteInfo(java.lang.Object json)For Internal use only, may be removed or deprecated in future.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.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddIncomingSelector(RouteSelector rs)Add a new incoming selector to the route.voidaddOutgoingSelector(RouteSelector rs)Add a new outgoing selector to the route.static RouteInfofrom(javax.management.openmbean.CompositeData cd)For Internal use only, may be removed or deprecated in future.longgetBacklogCount()Get the route's backlog count.longgetBacklogSize()Get the route's backlog size.longgetConnectionID()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.StatDatagetInboundStatistics()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.StringgetName()Get the name of the remote server in this route.java.lang.StringgetOAuth2AccessTokenFile()Get the path of the file that contains the access token for authenticating with the EMS server at the other end of the route.java.lang.StringgetOAuth2ClientId()Get the OAuth 2.0 client ID.booleangetOAuth2DisableVerifyHostname()Returns whether client verification of the OAuth 2.0 authorization server's hostname is disabled.java.lang.StringgetOAuth2ExpectedHostname()Get the hostname expected to be set in the OAuth 2.0 authorization server host's certificate.java.lang.StringgetOAuth2GrantType()Get the OAuth 2.0 grant type used to obtain access tokens from the OAuth 2.0 authorization server.java.util.MapgetOAuth2Params()Get the OAuth 2.0 parameters for the connection to the remote server.java.lang.StringgetOAuth2ServerTrustFile()Get the path to the trust file used to verify the OAuth 2.0 authorization server's identity.java.lang.StringgetOAuth2ServerURL()Get the URL of the OAuth 2.0 authorization server that will issue access tokens for authenticating with the EMS server at the other end of the route.StatDatagetOutboundStatistics()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.MapgetParams()Get the TLS and/or OAuth 2.0 parameters for the connection to the remote server.java.util.MapgetSSLParams()Get the TLS parameters for the connection to the remote server.intgetTopicPrefetch()Get the topic prefetch of this route.java.lang.StringgetURL()Get the URL of the remote server in this route.java.lang.StringgetZoneName()Get the name of the zone this route is in.shortgetZoneType()Get the type of zone this route is in.booleanisConfigured()Indicates whether or not the route is defined in the server configuration.booleanisConnected()Indicates whether or not the route is connected.booleanisStalled()Indicates whether or not this route has stalled destinations.voidremoveIncomingSelector(java.lang.String topic)Remove the incoming selector on a given topic.voidremoveOutgoingSelector(java.lang.String topic)Remove the outgoing selector on a given topic.voidsetName(java.lang.String name)Set the name of the remote server in this route.voidsetOAuth2AccessTokenFile(java.lang.String path)Set the path of the file that contains the access token for authenticating with the EMS server at the other end of the route.voidsetOAuth2ClientId(java.lang.String id)Set the OAuth 2.0 client ID.voidsetOAuth2ClientSecret(java.lang.String secret)Set the OAuth 2.0 client secret.voidsetOAuth2DisableVerifyHostname(boolean disableVerifyHostname)Set whether client verification of the OAuth 2.0 authorization server's hostname should be disabled.voidsetOAuth2ExpectedHostname(java.lang.String expectedHostname)Set the hostname expected to be found in the OAuth 2.0 authorization server host's certificate.voidsetOAuth2GrantType(java.lang.String grantType)Set the OAuth 2.0 grant type used to obtain access tokens from the OAuth 2.0 authorization server.voidsetOAuth2Params(java.util.Map params)Set the OAuth 2.0 parameters for the connection to the remote server.voidsetOAuth2ServerTrustFile(java.lang.String file)Set the path to the trust file used to verify the OAuth 2.0 authorization server's identity.voidsetOAuth2ServerURL(java.lang.String url)Set the URL of the OAuth 2.0 authorization server that will issue access tokens for authenticating with the EMS server at the other end of the route.voidsetSSLParams(java.util.Map params)Set the TLS parameters for the connection to the remote server.voidsetTopicPrefetch(int prefetch)Set the topic prefetch of this route.voidsetURL(java.lang.String url)Set the URL of the remote server in this route.java.lang.StringstatString()Helper method to generate the statistical information in string form.java.lang.StringtoString()voidupdateIncomingSelector(RouteSelector rs)Replace the current incoming selector on a given topic with a new one.voidupdateOutgoingSelector(RouteSelector rs)Replace the current outgoing selector on a given topic with a new one.
 
- 
- 
- 
Field Detail- 
ZONE_TYPE_MULTI_HOPpublic 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_HOPpublic 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_UNKNOWNpublic static final short ZONE_TYPE_UNKNOWN A zone of unknown type indicates some kind of error.- See Also:
- Constant Field Values
 
 - 
DEFAULT_DAG_ZONEpublic 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- 
RouteInfopublic 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 TLS and/or OAuth 2.0 parameters for the connection to the remote server (can be null).
 
 - 
RouteInfopublic 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 TLS and/or OAuth 2.0 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_HOPor- ZONE_TYPE_ONE_HOP.
 
 - 
RouteInfopublic 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 TLS and/or OAuth 2.0 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_HOPor- ZONE_TYPE_ONE_HOP.
- topicPrefetch- the prefetch that overrides individual topic prefetches
- Since:
- EMS 8.1
 
 - 
RouteInfopublic RouteInfo(java.lang.Object json) throws JMSExceptionFor Internal use only, may be removed or deprecated in future.- Throws:
- JMSException
 
 
- 
 - 
Method Detail- 
isConfiguredpublic 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.
 
 - 
isConnectedpublic 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.
 
 - 
isStalledpublic 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.
 
 - 
getConnectionIDpublic long getConnectionID() Returns connection ID of this route or 0 if route is not connected.
 - 
getBacklogCountpublic long getBacklogCount() Get the route's backlog count.- Returns:
- the number of messages in the route's backlog
- Since:
- EMS 5.0
 
 - 
getBacklogSizepublic long getBacklogSize() Get the route's backlog size.- Returns:
- the size of all messages in the route's backlog
- Since:
- EMS 5.0
 
 - 
getURLpublic java.lang.String getURL() Get the URL of the remote server in this route.- Returns:
- the URL of the remote server in this route.
 
 - 
setURLpublic 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.
 
 - 
getNamepublic java.lang.String getName() Get the name of the remote server in this route.- Returns:
- the name of the remote server in this route.
 
 - 
setNamepublic 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.
 
 - 
getTopicPrefetchpublic int getTopicPrefetch() Get the topic prefetch of this route.- Returns:
- the topic prefetch of this route.
- Since:
- EMS 8.1
 
 - 
setTopicPrefetchpublic void setTopicPrefetch(int prefetch) Set the topic prefetch of this route.- Parameters:
- prefetch- the topic prefetch of this route.
- Since:
- EMS 8.1
 
 - 
getParamspublic java.util.Map getParams() Get the TLS and/or OAuth 2.0 parameters for the connection to the remote server.- Returns:
- the TLS parameters for the connection to the remote server or null if none exist.
 
 - 
getSSLParamspublic java.util.Map getSSLParams() Get the TLS parameters for the connection to the remote server.- Returns:
- the TLS parameters for the connection to the remote server or null if none exist.
- Since:
- EMS 10.4.0
 
 - 
setSSLParamspublic void setSSLParams(java.util.Map params) Set the TLS parameters for the connection to the remote server.- Parameters:
- params- the TLS parameters for the connection to the remote server.
 
 - 
getOAuth2Paramspublic java.util.Map getOAuth2Params() Get the OAuth 2.0 parameters for the connection to the remote server.- Returns:
- the OAuth 2.0 parameters for the connection to the remote server or null if none exist.
- Since:
- EMS 10.4.0
 
 - 
setOAuth2Paramspublic void setOAuth2Params(java.util.Map params) Set the OAuth 2.0 parameters for the connection to the remote server.- Parameters:
- params- the OAuth 2.0 parameters for the connection to the remote server.
- Since:
- EMS 10.4.0
 
 - 
getZoneNamepublic 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.
 
 - 
getZoneTypepublic 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.
 
 - 
getInboundStatisticspublic 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.
 
 - 
getOutboundStatisticspublic 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.
 
 - 
getDetailedStatisticspublic 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.
 
 - 
getIncomingSelectorspublic 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.
 
 - 
addIncomingSelectorpublic 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.
 
 - 
removeIncomingSelectorpublic void removeIncomingSelector(java.lang.String topic) throws TibjmsAdminInvalidNameExceptionRemove 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.
 
 - 
updateIncomingSelectorpublic 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.
 
 - 
getOutgoingSelectorspublic 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.
 
 - 
addOutgoingSelectorpublic 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.
 
 - 
removeOutgoingSelectorpublic void removeOutgoingSelector(java.lang.String topic) throws TibjmsAdminInvalidNameExceptionRemove 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.
 
 - 
updateOutgoingSelectorpublic 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.
 
 - 
getOAuth2AccessTokenFilepublic java.lang.String getOAuth2AccessTokenFile() Get the path of the file that contains the access token for authenticating with the EMS server at the other end of the route.- Returns:
- the path of the file containing the OAuth 2.0 access token.
- Since:
- EMS 10.4.0
 
 - 
setOAuth2AccessTokenFilepublic void setOAuth2AccessTokenFile(java.lang.String path) Set the path of the file that contains the access token for authenticating with the EMS server at the other end of the route.- Parameters:
- the- path of the file containing the OAuth 2.0 access token.
- Since:
- EMS 10.4.0
 
 - 
getOAuth2ServerURLpublic java.lang.String getOAuth2ServerURL() Get the URL of the OAuth 2.0 authorization server that will issue access tokens for authenticating with the EMS server at the other end of the route.- Returns:
- the URL of the OAuth 2.0 authorization server.
- Since:
- EMS 10.3.0
 
 - 
setOAuth2ServerURLpublic void setOAuth2ServerURL(java.lang.String url) Set the URL of the OAuth 2.0 authorization server that will issue access tokens for authenticating with the EMS server at the other end of the route.- Parameters:
- the- URL of the OAuth 2.0 authorization server.
- Since:
- EMS 10.3.0
 
 - 
getOAuth2GrantTypepublic java.lang.String getOAuth2GrantType() Get the OAuth 2.0 grant type used to obtain access tokens from the OAuth 2.0 authorization server. Obtained access tokens will be used to authenticate with the EMS server at the other end of the route.- Returns:
- the OAuth 2.0 grant type.
- Since:
- EMS 10.3.0
 
 - 
setOAuth2GrantTypepublic void setOAuth2GrantType(java.lang.String grantType) Set the OAuth 2.0 grant type used to obtain access tokens from the OAuth 2.0 authorization server. Obtained access tokens will be used to authenticate with the EMS server at the other end of the route.- Since:
- EMS 10.3.0
 
 - 
getOAuth2ClientIdpublic java.lang.String getOAuth2ClientId() Get the OAuth 2.0 client ID. This value is used along with the OAuth 2.0 client secret to connect to the OAuth 2.0 authorization server and obtain access tokens for authenticating with the EMS server at the other end of the route.- Returns:
- the OAuth 2.0 client ID.
- Since:
- EMS 10.3.0
 
 - 
setOAuth2ClientIdpublic void setOAuth2ClientId(java.lang.String id) Set the OAuth 2.0 client ID. This value is used along with the OAuth 2.0 client secret to connect to the OAuth 2.0 authorization server and obtain access tokens for authenticating with the EMS server at the other end of the route.- Parameters:
- the- OAuth 2.0 client ID.
- Since:
- EMS 10.3.0
 
 - 
setOAuth2ClientSecretpublic void setOAuth2ClientSecret(java.lang.String secret) Set the OAuth 2.0 client secret. This value is used along with the OAuth 2.0 client ID to connect to the OAuth 2.0 authorization server and obtain access tokens for authenticating with the EMS server at the other end of the route.- Parameters:
- the- OAuth 2.0 client secret.
- Since:
- EMS 10.3.0
 
 - 
getOAuth2ServerTrustFilepublic java.lang.String getOAuth2ServerTrustFile() Get the path to the trust file used to verify the OAuth 2.0 authorization server's identity. This verification is performed when connecting to a secure authorization server to obtain access tokens for authenticating with the EMS server at the other end of the route.- Returns:
- the path to trust file.
- Since:
- EMS 10.3.0
 
 - 
setOAuth2ServerTrustFilepublic void setOAuth2ServerTrustFile(java.lang.String file) Set the path to the trust file used to verify the OAuth 2.0 authorization server's identity. This verification is performed when connecting to a secure authorization server to obtain access tokens for authenticating with the EMS server at the other end of the route.- Parameters:
- the- path to the trust file.
- Since:
- EMS 10.3.0
 
 - 
getOAuth2DisableVerifyHostnamepublic boolean getOAuth2DisableVerifyHostname() Returns whether client verification of the OAuth 2.0 authorization server's hostname is disabled. Verification is enabled by default and is performed when connecting to a secure authorization server to obtain access tokens for authenticating with the EMS server at the other end of the route.- Returns:
- true if verification is disabled, false otherwise.
- Since:
- EMS 10.3.0
 
 - 
setOAuth2DisableVerifyHostnamepublic void setOAuth2DisableVerifyHostname(boolean disableVerifyHostname) Set whether client verification of the OAuth 2.0 authorization server's hostname should be disabled. Verification is enabled by default and is performed when connecting to a secure authorization server to obtain access tokens for authenticating with the EMS server at the other end of the route.- Parameters:
- true- if verification should be disabled, false otherwise.
- Since:
- EMS 10.3.0
 
 - 
getOAuth2ExpectedHostnamepublic java.lang.String getOAuth2ExpectedHostname() Get the hostname expected to be set in the OAuth 2.0 authorization server host's certificate. Hostname verification is performed when connecting to a secure authorization server to obtain access tokens for authenticating with the EMS server at the other end of the route.- Returns:
- the expected hostname.
- Since:
- EMS 10.3.0
 
 - 
setOAuth2ExpectedHostnamepublic void setOAuth2ExpectedHostname(java.lang.String expectedHostname) Set the hostname expected to be found in the OAuth 2.0 authorization server host's certificate. Hostname verification is performed when connecting to a secure authorization server to obtain access tokens for authenticating with the EMS server at the other end of the route.- Parameters:
- the- expected hostname.
- Since:
- EMS 10.3.0
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
statStringpublic java.lang.String statString() Helper method to generate the statistical information in string form.- Returns:
- a String representation of statistical information.
 
 - 
frompublic 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
 
 
- 
 
-