org.apache.ws.notification.topics.expression
Interface TopicExpressionEngine


public interface TopicExpressionEngine

The TopicExpressionEngine interface is used to map queries on a topic list to the appropriate TopicExpressionEvaluators and then return the result. TopicExpressionEvaluators can be preconfigured or dynamically added at runtime.

See Also:
TopicExpressionEvaluator

Method Summary
 Topic[] evaluateTopicExpression(TopicSpaceSet topicSpaceSet, TopicExpression topicExpression)
          Resolves a topic expression using the passed topic list.
 TopicExpressionEvaluator getEvaluator(java.lang.String dialect)
          Gets the evaluator currently registered to handle a topic expression of the specified dialect.
 java.lang.String[] getSupportedDialects()
          Returns a list of URIs representing the registered topic expression dialects
 void registerEvaluator(TopicExpressionEvaluator evaluator)
          registers a new evaluator that can be used to evaluate topic expressions
 

Method Detail

getEvaluator

public TopicExpressionEvaluator getEvaluator(java.lang.String dialect)
Gets the evaluator currently registered to handle a topic expression of the specified dialect.

Returns:
the matching topic expression evaluator or null if none was found

getSupportedDialects

public java.lang.String[] getSupportedDialects()
Returns a list of URIs representing the registered topic expression dialects

Returns:
the list of supported dialects

evaluateTopicExpression

public Topic[] evaluateTopicExpression(TopicSpaceSet topicSpaceSet,
                                       TopicExpression topicExpression)
                                throws TopicPathDialectUnknownException,
                                       TopicExpressionResolutionException,
                                       InvalidTopicExpressionException,
                                       TopicExpressionException
Resolves a topic expression using the passed topic list. The appropraite TopicExpressionEvaluator is used based on the dialect element.

Parameters:
topicSpaceSet - the topic list to apply the expression to
topicExpression - topic expression
Returns:
the set of topics the expression evaluated to
Throws:
TopicPathDialectUnknownException - if the topic expression dialect is not supported
TopicExpressionResolutionException - if the expression could not be evaluated
InvalidTopicExpressionException - if the topic expression is invalid
TopicExpressionException - if any other error occurs

registerEvaluator

public void registerEvaluator(TopicExpressionEvaluator evaluator)
registers a new evaluator that can be used to evaluate topic expressions

Parameters:
evaluator - implementation of evaluator to be used for evaluating topic expressions


Copyright © 2004-2005 Apache Software Foundation. All Rights Reserved.