Class PatternCommandActivity<C extends CommandContext>
java.lang.Object
com.symphony.bdk.core.activity.AbstractActivity<V4MessageSent,C>
com.symphony.bdk.core.activity.command.CommandActivity<C>
com.symphony.bdk.core.activity.command.PatternCommandActivity<C>
@API(status=EXPERIMENTAL)
public abstract class PatternCommandActivity<C extends CommandContext>
extends CommandActivity<C>
Experimental implementation of the default
CommandActivity
that ease parsing of the text message.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
beforeMatcher
(C context) This callback can be used to prepareActivityContext
before actually processing theActivityMatcher.matches(ActivityContext)
method.matcher()
Any kind of activity must provide anActivityMatcher
in order to detect if it can be applied to a certain user input.protected abstract Pattern
pattern()
protected void
prepareContext
(C context, Matcher matcher) Methods inherited from class com.symphony.bdk.core.activity.command.CommandActivity
bindToRealTimeEventsSource
Methods inherited from class com.symphony.bdk.core.activity.AbstractActivity
createContextInstance, getInfo, info, isAsynchronous, onActivity, processEvent
-
Constructor Details
-
PatternCommandActivity
public PatternCommandActivity()
-
-
Method Details
-
pattern
-
prepareContext
-
beforeMatcher
Description copied from class:CommandActivity
This callback can be used to prepareActivityContext
before actually processing theActivityMatcher.matches(ActivityContext)
method.- Overrides:
beforeMatcher
in classCommandActivity<C extends CommandContext>
-
matcher
Description copied from class:AbstractActivity
Any kind of activity must provide anActivityMatcher
in order to detect if it can be applied to a certain user input.- Specified by:
matcher
in classAbstractActivity<V4MessageSent,
C extends CommandContext> - Returns:
- an
ActivityMatcher
implementation.
-