|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.echarts.servlet.sip.appRouter.DFCRouterImpl.AddressPattern
public class AddressPattern
The AddressPattern class encapsulates a regular expression that establishes a pattern against which addresses are evaluated for a match. Address patterns occur in subscription rules, each of which maps an address pattern to a list of subscribing applications.
Field Summary | |
---|---|
static boolean |
ENCODE
|
static java.lang.String |
metaChars
|
Constructor Summary | |
---|---|
AddressPattern(java.lang.String regExp)
Build AddressPattern from string representation of regular expression |
|
AddressPattern(java.lang.String regExp,
boolean encode)
Encapsulate a regular expresssion as an AddressPattern, optionally encoding literal strings that contain regular expression meta-characters. |
Method Summary | |
---|---|
static java.lang.String |
decode(java.lang.String literal)
Unescape regular expression meta-characters in literal string. |
static java.lang.String |
encode(java.lang.String literal)
Escape regular expression meta-characters using the backslash character, '\'. |
boolean |
equals(java.lang.Object o)
Check if two address patterns are equal. |
java.lang.String |
getRegExp()
Get a String represenation of the underlying regular expression. |
boolean |
matches(Address address)
Indicates whether the given address matches the address pattern. |
java.lang.String |
toString()
Get String representation of the regular expression |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String metaChars
public static final boolean ENCODE
Constructor Detail |
---|
public AddressPattern(java.lang.String regExp) throws java.util.regex.PatternSyntaxException
regExp
- String representation of Java regular expression
java.util.regex.PatternSyntaxException
- if regular expression is not well formedpublic AddressPattern(java.lang.String regExp, boolean encode) throws java.util.regex.PatternSyntaxException
regExp
- - the String representing the regular expresssionencode
- - Does the regExp string have literal characters in it
that need to be escaped to avoid being interpreted as regular expression
meta-characters
java.util.regex.PatternSyntaxException
Method Detail |
---|
public static java.lang.String encode(java.lang.String literal)
public static java.lang.String decode(java.lang.String literal)
public boolean equals(java.lang.Object o)
They define the same set of matching strings but are lexicographically unequal.
equals
in class java.lang.Object
public java.lang.String getRegExp()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean matches(Address address)
address
- The address to be checked for a match. Since SIP URIs are case insensitive,
matches are performed in a case-insensitive manner.
true
if the address matches the pattern, else false
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |