public class ConnectionStateMachineConfig
extends java.lang.Object
IBlaubotAdapter
implementation.
Contains adapter specific constants.Constructor and Description |
---|
ConnectionStateMachineConfig() |
Modifier and Type | Method and Description |
---|---|
int |
getCrowningPreparationTimeout() |
int |
getKingdomMergeOldKingBowDownTimeout() |
int |
getKingWithoutPeasantsTimeout() |
int |
getPrinceAckTimeout() |
void |
setCrowningPreparationTimeout(int crowningPreparationTimeout)
The preparation time for the prince to be crowned.
== the time all peasants will wait before connecting to the
prince, if the king connection gets lost.
|
void |
setKingdomMergeOldKingBowDownTimeout(int kingdomMergeOldKingBowDownTimeout)
This timeout is used when a king gets informed about another king and decides to bow his kingdom
down to the other king.
|
void |
setKingWithoutPeasantsTimeout(int kingWithoutPeasantsTimeout)
The timeout after the
ConnectionStateMachine will go to FreeState ,
if no peasants are connected. |
void |
setPrinceAckTimeout(int princeAckTimeout)
After the prince gets pronounced via a
PronouncePrinceAdminMessage , the pronounced device has to
respond within this timeouts time interval with an ACKPronouncePrinceAdminMessage to accept
his new position. |
static void |
validateTimeouts(ConnectionStateMachineConfig cfg,
BlaubotAdapterConfig adapterConfig) |
public int getCrowningPreparationTimeout()
public void setCrowningPreparationTimeout(int crowningPreparationTimeout)
PeasantState
and PrinceState
.crowningPreparationTimeout
- the preparation timepublic int getKingWithoutPeasantsTimeout()
public void setKingWithoutPeasantsTimeout(int kingWithoutPeasantsTimeout)
ConnectionStateMachine
will go to FreeState
,
if no peasants are connected.
Only relevant in KingState
kingWithoutPeasantsTimeout
- the timeoutpublic static void validateTimeouts(ConnectionStateMachineConfig cfg, BlaubotAdapterConfig adapterConfig)
public int getKingdomMergeOldKingBowDownTimeout()
public void setKingdomMergeOldKingBowDownTimeout(int kingdomMergeOldKingBowDownTimeout)
kingdomMergeOldKingBowDownTimeout
- the timeout to wait before the king cuts his peasant connections on a kingdom mergerpublic int getPrinceAckTimeout()
public void setPrinceAckTimeout(int princeAckTimeout)
PronouncePrinceAdminMessage
, the pronounced device has to
respond within this timeouts time interval with an ACKPronouncePrinceAdminMessage
to accept
his new position. If he does not respond fast enough, the pronouncing process is retriggered.princeAckTimeout
- the timeout to set