Class PresenceMatcher
- java.lang.Object
-
- csw.command.client.models.matchers.PresenceMatcher
-
- All Implemented Interfaces:
StateMatcher
,java.io.Serializable
,scala.Equals
,scala.Product
public class PresenceMatcher extends java.lang.Object implements StateMatcher, scala.Product, java.io.Serializable
PresenceMatcher only checks for the existence of a CurrentState with a given prefix and nameparam: prefix the prefix to match against the CurrentState param: stateName the name to match against the stateName of CurrentState param: timeout A timeout for which the matching should be executed. Once the timeout occurs, complete the match with MatchFailed response and appropriate failure exception.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PresenceMatcher(Prefix prefix, StateName stateName, akka.util.Timeout timeout)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract static R
apply(T1 v1, T2 v2, T3 v3)
boolean
check(CurrentState current)
A predicate that returns true when a CurrentState is published that matches the prefix and stateName that are arguments to the PresenceMatcherPrefix
prefix()
The prefix of the destination component for which the current state is being matchedStateName
stateName()
The name of the state to match forakka.util.Timeout
timeout()
The maximum duration for which the matching is executed if not completed either successfully or unsuccessfullystatic java.lang.String
toString()
-
-
-
Method Detail
-
apply
public abstract static R apply(T1 v1, T2 v2, T3 v3)
-
toString
public static java.lang.String toString()
-
prefix
public Prefix prefix()
Description copied from interface:StateMatcher
The prefix of the destination component for which the current state is being matched- Specified by:
prefix
in interfaceStateMatcher
- Returns:
- the prefix of destination component
-
stateName
public StateName stateName()
Description copied from interface:StateMatcher
The name of the state to match for- Specified by:
stateName
in interfaceStateMatcher
- Returns:
- the name of the state
-
timeout
public akka.util.Timeout timeout()
Description copied from interface:StateMatcher
The maximum duration for which the matching is executed if not completed either successfully or unsuccessfully- Specified by:
timeout
in interfaceStateMatcher
- Returns:
- (undocumented)
-
check
public boolean check(CurrentState current)
A predicate that returns true when a CurrentState is published that matches the prefix and stateName that are arguments to the PresenceMatcher- Specified by:
check
in interfaceStateMatcher
- Parameters:
current
- current state to be matched as represented byCurrentState
- Returns:
- true if match is successful, false otherwise
-
-