@API(status=EXPERIMENTAL) public abstract class PatternCommandActivity<C extends CommandContext> extends CommandActivity<C>
CommandActivity
that ease parsing of the text message.Constructor and Description |
---|
PatternCommandActivity() |
Modifier and Type | Method and Description |
---|---|
protected void |
beforeMatcher(C context)
This callback can be used to prepare
ActivityContext before actually processing the
ActivityMatcher.matches(ActivityContext) method. |
ActivityMatcher<C> |
matcher()
Any kind of activity must provide an
ActivityMatcher in order to detect if it can be applied to a certain
user input. |
protected abstract java.util.regex.Pattern |
pattern() |
protected void |
prepareContext(C context,
java.util.regex.Matcher matcher) |
bindToRealTimeEventsSource
createContextInstance, getInfo, info, onActivity, processEvent
protected abstract java.util.regex.Pattern pattern()
protected void prepareContext(C context, java.util.regex.Matcher matcher)
protected void beforeMatcher(C context)
CommandActivity
ActivityContext
before actually processing the
ActivityMatcher.matches(ActivityContext)
method.beforeMatcher
in class CommandActivity<C extends CommandContext>
public ActivityMatcher<C> matcher()
AbstractActivity
ActivityMatcher
in order to detect if it can be applied to a certain
user input.matcher
in class AbstractActivity<V4MessageSent,C extends CommandContext>
ActivityMatcher
implementation.