org.apache.felix.ipojo.handlers.event
Class EventUtil

java.lang.Object
  extended by org.apache.felix.ipojo.handlers.event.EventUtil

public class EventUtil
extends Object

Utility methods.

Author:
Felix Project Team

Field Summary
static String TOPIC_SEPARATOR
          The separator between topics.
static String TOPIC_TOKEN_SEPARATOR
          The separator between topics.
 
Constructor Summary
EventUtil()
           
 
Method Summary
static boolean isValidTopic(String topic)
          Check the given topic is valid.
static boolean isValidTopicScope(String topicScope)
          Check the given topic scope is valid.
static boolean matches(String topic, String topicPattern)
          Tests that the given topic match with the given topic pattern.
static boolean matches(String topic, String[] topicPatterns)
          Tests that the given topic match with the given topic patterns.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOPIC_SEPARATOR

public static final String TOPIC_SEPARATOR
The separator between topics.

See Also:
Constant Field Values

TOPIC_TOKEN_SEPARATOR

public static final String TOPIC_TOKEN_SEPARATOR
The separator between topics.

See Also:
Constant Field Values
Constructor Detail

EventUtil

public EventUtil()
Method Detail

matches

public static final boolean matches(String topic,
                                    String topicPattern)
Tests that the given topic match with the given topic pattern.

Parameters:
topic - the topic to test
topicPattern - the topic pattern
Returns:
true if it matches.

matches

public static final boolean matches(String topic,
                                    String[] topicPatterns)
Tests that the given topic match with the given topic patterns.

Parameters:
topic - the topic to test
topicPatterns - the topic patterns
Returns:
true if it matches.

isValidTopicScope

public static final boolean isValidTopicScope(String topicScope)
Check the given topic scope is valid. topicScope ::= "*" | ( topic "/*" ? )

Parameters:
topicScope - the topic scope to check.
Returns:
true if the given topic scope is valid, false otherwise.

isValidTopic

public static final boolean isValidTopic(String topic)
Check the given topic is valid. topic ::= token ( �/� token ) *

Parameters:
topic - the topic to check.
Returns:
true if the given topic is valid, false otherwise.


Copyright © 2011 Apache Software Foundation. All Rights Reserved.