net.geant.edugain.attributes.matchers
Interface Matcher

All Known Implementing Classes:
AbstractProviderMatcher, AttributeMatcher, LocalProviderMatcher, RemoteProviderMatcher

public interface Matcher

Matcher interface for Rule matchers. The Matcher is configured via the init(MatchType) method in configuration time, and called via the match(RuleContext) method in runtime.

Author:
Adam Lantos

Method Summary
 void init(MatchType configuration)
          Initializes the matcher.
 boolean match(RuleContext c)
          Run-time matching.
 

Method Detail

init

void init(MatchType configuration)
Initializes the matcher. As this method is called only once, regular expression matchers SHOULD compile the regular expression in this method, and store them for run-time use.

Parameters:
configuration - parsed XML configuration.

match

boolean match(RuleContext c)
Run-time matching. Matcher implementations MUST return false when no match is found within the context - and stop the Rule processing.

Parameters:
c - the RuleContext to use.
Returns:
whether match succeede.