|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.comm.ReconnectStrategies
public final class ReconnectStrategies
This class provides some static factory methods for creating different reconnect strategies.
| Method Summary | |
|---|---|
static ReconnectStrategy |
alwaysReconnect()
Creates a ReconnectStrategy that will allow infinite reconnection attempts. |
static ReconnectStrategy |
maxReconnectFailures(int maxTotalFailures)
Creates a ReconnectStrategy that will only allow a certain total number of reconnection attempts per
connection. |
static ReconnectStrategy |
maxReconnectFailuresWithReset(int maxFailuresInARow)
This class implements an ReconnectStrategy that will restrict the number of failed reconnection attempts
in a row by a given value (per connection). |
static ReconnectStrategy |
neverReconnect()
Creates a ReconnectStrategy that will reject any reconnection attempts. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static ReconnectStrategy neverReconnect()
ReconnectStrategy that will reject any reconnection attempts. A connection using this
strategy will never try to reconnect automatically.
public static ReconnectStrategy alwaysReconnect()
ReconnectStrategy that will allow infinite reconnection attempts. A connection using this
strategy will always try to reconnect when the connection breaks down.
public static ReconnectStrategy maxReconnectFailures(int maxTotalFailures)
ReconnectStrategy that will only allow a certain total number of reconnection attempts per
connection. A successful reconnection attempt does not reset the number of failures. The failed attempts are thus
counted over the entire lifetime of the connection, no matter if there have been any successful reconnection
attempts in the meantime.
maxTotalFailures - the maximum allowed total reconnection failures
public static ReconnectStrategy maxReconnectFailuresWithReset(int maxFailuresInARow)
ReconnectStrategy that will restrict the number of failed reconnection attempts
in a row by a given value (per connection). A successful reconnection attempt will reset the number of failures.
Thus, the total number of failed attempts throughout the entire lifetime of a connection might be unlimited, but
the connection will stop to reconnect after the given number of failed attempts in a row has been reached.
maxFailuresInARow - the maximum allowed reconnection failures in a row
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||