Package org.jgroups.protocols.relay
Class ForwardingRoute
- java.lang.Object
-
- org.jgroups.protocols.relay.ForwardingRoute
-
- All Implemented Interfaces:
java.lang.Comparable<ForwardingRoute>
public class ForwardingRoute extends java.lang.Object implements java.lang.Comparable<ForwardingRoute>
Route which forwards all messages to a given site via a given route.
Example: if site HF is reachable via NET1, and NET2 is not directly connected to HF, it needs to have a ForwardConfig with to="HF" and gateway="NET1". This means that a message to site HF will be forwarded to NET1, which then forwards it to HF.
Note that 'to' can be a regular expression andmatches(String)
can be used to match a given site against it.- Since:
- 5.2.15
- Author:
- Bela Ban
-
-
Constructor Summary
Constructors Constructor Description ForwardingRoute(java.lang.String to, java.lang.String gateway)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(ForwardingRoute o)
boolean
equals(java.lang.Object obj)
java.lang.String
gateway()
ForwardingRoute
gateway(java.lang.String gw)
boolean
matches(java.lang.String site)
java.lang.String
to()
ForwardingRoute
to(java.lang.String to)
java.lang.String
toString()
-
-
-
Method Detail
-
to
public java.lang.String to()
-
to
public ForwardingRoute to(java.lang.String to)
-
gateway
public java.lang.String gateway()
-
gateway
public ForwardingRoute gateway(java.lang.String gw)
-
matches
public boolean matches(java.lang.String site)
-
compareTo
public int compareTo(ForwardingRoute o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<ForwardingRoute>
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-