public class RouteInfo
extends java.lang.Object
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 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.
|
Modifier and Type | Method and Description |
---|---|
void |
addIncomingSelector(RouteSelector rs)
Add a new incoming selector to the route.
|
void |
addOutgoingSelector(RouteSelector rs)
Add a new outgoing selector to the route.
|
static RouteInfo |
from(javax.management.openmbean.CompositeData cd)
For Internal use only, may be removed or deprecated in future.
|
long |
getBacklogCount()
Get the route's backlog count.
|
long |
getBacklogSize()
Get the route's backlog size.
|
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.
|
int |
getTopicPrefetch()
Get the topic prefetch of this route.
|
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 |
setTopicPrefetch(int prefetch)
Set the topic prefetch of this route.
|
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.
|
public static final short ZONE_TYPE_MULTI_HOP
public static final short ZONE_TYPE_ONE_HOP
public static final short ZONE_TYPE_UNKNOWN
public static final java.lang.String DEFAULT_DAG_ZONE
public RouteInfo(java.lang.String name, java.lang.String url, java.util.Map params)
DEFAULT_DAG_ZONE
).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).public RouteInfo(java.lang.String name, java.lang.String url, java.util.Map params, java.lang.String zoneName, short zoneType)
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
.public RouteInfo(java.lang.String name, java.lang.String url, java.util.Map params, java.lang.String zoneName, short zoneType, int topicPrefetch)
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 prefetchespublic boolean isConfigured()
public boolean isConnected()
public boolean isStalled()
public long getConnectionID()
public long getBacklogCount()
public long getBacklogSize()
public java.lang.String getURL()
public void setURL(java.lang.String url)
url
- the URL of the remote server in this route.public java.lang.String getName()
public void setName(java.lang.String name)
name
- the name of the remote server in this route.public int getTopicPrefetch()
public void setTopicPrefetch(int prefetch)
prefetch
- the topic prefetch of this route.public java.util.Map getParams()
public void setSSLParams(java.util.Map params)
params
- the SSL parameters for the connection to the remote server.public java.lang.String getZoneName()
DEFAULT_DAG_ZONE
.public short getZoneType()
ZONE_TYPE_MULTI_HOP
.public StatData getInboundStatistics()
public StatData getOutboundStatistics()
public DetailedDestStat[] getDetailedStatistics()
public RouteSelector[] getIncomingSelectors()
public void addIncomingSelector(RouteSelector rs) throws java.lang.IllegalArgumentException
rs
- the new selector.java.lang.IllegalArgumentException
- if rs is null.public void removeIncomingSelector(java.lang.String topic) throws TibjmsAdminInvalidNameException
topic
- the topic to remove the selector from.TibjmsAdminInvalidNameException
- if topic is not a valid topic.public void updateIncomingSelector(RouteSelector rs) throws java.lang.IllegalArgumentException
rs
- the updated selector.java.lang.IllegalArgumentException
- if rs is null.public RouteSelector[] getOutgoingSelectors()
public void addOutgoingSelector(RouteSelector rs) throws java.lang.IllegalArgumentException
rs
- the new selector.java.lang.IllegalArgumentException
- if rs is null.public void removeOutgoingSelector(java.lang.String topic) throws TibjmsAdminInvalidNameException
topic
- the topic to remove the selector from.TibjmsAdminInvalidNameException
- if topic is not a valid topic.public void updateOutgoingSelector(RouteSelector rs) throws java.lang.IllegalArgumentException
rs
- the updated selector.java.lang.IllegalArgumentException
- if rs is null.public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String statString()
public static RouteInfo from(javax.management.openmbean.CompositeData cd) throws java.lang.Exception
java.lang.IllegalArgumentException
- if CompositeType does not match
or if a null CompositeData is passed.java.lang.Exception
Copyright © Cloud Software Group, Inc. All rights reserved