class Matcher extends AnyRef
The matcher uses the matching definition as provided by csw.messages.commands.matchers.StateMatcher to match against the state generated by subscribing a source of that state
- Alphabetic
- By Inheritance
- Matcher
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Matcher(currentStateSource: ActorRef[ComponentStateSubscription], stateMatcher: StateMatcher)(implicit ec: ExecutionContext, mat: Materializer)
- currentStateSource
source of the state which needs to be matched against the current state specified in state matcher
- stateMatcher
the matcher definition to execute
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
jStart: CompletableFuture[MatcherResponse]
Start the matching process from Java application
Start the matching process from Java application
- returns
the result of matching as a CompletableFuture of MatcherResponse
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
start: Future[MatcherResponse]
Start the matching process
Start the matching process
- returns
the result of matching as a Future value of MatcherResponse
-
def
stop(): Unit
Abort the stream of subscribed state in case matching is no longer required.
Abort the stream of subscribed state in case matching is no longer required. Eg. when composing operations in command execution, the matching was started before knowing the actual result of validation and the validation failed.
val matcherResponseF: Future[MatcherResponse] = matcher.start val eventualCommandResponse: Future[CommandResponse] = async { val initialResponse = await(assemblyComponent.oneway(setupWithMatcher)) initialResponse match { case _: Accepted ⇒ val matcherResponse = await(matcherResponseF) matcherResponse match { case MatchCompleted ⇒ Completed(setupWithMatcher.runId) case MatchFailed(ex) ⇒ Error(setupWithMatcher.runId, ex.getMessage) } case invalid: Invalid ⇒ matcher.stop() invalid case x ⇒ x }
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )