Interface SyntaxIdentifier
-
- All Superinterfaces:
ComponentLifecycle
,Condition
- All Known Implementing Classes:
AlwaysMatchSyntaxIdentifier
,RegexpSyntaxIdentifier
,SyntaxIdentifierBase
,SyntaxIdentifierImpl
,XmlSyntaxIdentifierImpl
,XpathNodeIdentifier
,XpathSyntaxIdentifier
public interface SyntaxIdentifier extends Condition
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:
SyntaxRoutingService
,Condition
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default boolean
evaluate(AdaptrisMessage msg)
Default implementation forCondition
java.lang.String
getDestination()
Get the configured destination.boolean
isThisSyntax(java.lang.String message)
Determine if this SyntaxIdentifer considers the message to match all the configured patterns.void
setDestination(java.lang.String dest)
Set the configured destination.-
Methods inherited from interface com.adaptris.core.ComponentLifecycle
close, init, start, stop
-
-
-
-
Method Detail
-
setDestination
void setDestination(java.lang.String dest)
Set the configured destination.This is the value that will be stored against the metadata key specified by SyntaxRoutingService.
- Parameters:
dest
- the destination.
-
getDestination
java.lang.String getDestination()
Get the configured destination.- Returns:
- the destination.
-
isThisSyntax
boolean isThisSyntax(java.lang.String message) throws ServiceException
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 boolean evaluate(AdaptrisMessage msg) throws CoreException
Default implementation forCondition
- Specified by:
evaluate
in interfaceCondition
- Throws:
CoreException
- Implementation Note:
- the default implementation just calls
isThisSyntax(String)
with the message content.
-
-