Interface SyntaxIdentifier
- All Superinterfaces:
ComponentLifecycle,Condition
- All Known Implementing Classes:
AlwaysMatchSyntaxIdentifier,RegexpSyntaxIdentifier,SyntaxIdentifierBase,SyntaxIdentifierImpl,XmlSyntaxIdentifierImpl,XpathNodeIdentifier,XpathSyntaxIdentifier
Interface used by SyntaxRoutingService.
The contract for this interface is such that isThisSyntax(String) should only return true, if and only if ALL
the configured patterns are matched within the document.
Since 3.10.0 this interface extends Condition which means that it can be used as part of the conditional
services; if used in such a manner, then configuration is contextual, get/setDestination will be ignored (but may still have to
be configured due to validation
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanevaluate(AdaptrisMessage msg) Default implementation forConditionGet the configured destination.booleanisThisSyntax(String message) Determine if this SyntaxIdentifer considers the message to match all the configured patterns.voidsetDestination(String dest) Set the configured destination.Methods inherited from interface com.adaptris.core.ComponentLifecycle
close, init, start, stop
-
Method Details
-
setDestination
Set the configured destination.This is the value that will be stored against the metadata key specified by SyntaxRoutingService.
- Parameters:
dest- the destination.
-
getDestination
String getDestination()Get the configured destination.- Returns:
- the destination.
-
isThisSyntax
Determine if this SyntaxIdentifer considers the message to match all the configured patterns.- Parameters:
message- the message to identify against.- Returns:
- true if it matches.
- Throws:
ServiceException- if there was an error with the pattern.
-
evaluate
Default implementation forCondition- Specified by:
evaluatein interfaceCondition- Throws:
CoreException- Implementation Note:
- the default implementation just calls
isThisSyntax(String)with the message content.
-