|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jlab.coda.cMsg.cMsgMessageMatcher
public class cMsgMessageMatcher
This class contains the methods used to determine whether a message's subject and type match a subscription's subject and type. It also contains a method to check the format of a server's name.
Constructor Summary | |
---|---|
cMsgMessageMatcher()
|
Method Summary | |
---|---|
static java.lang.String |
constructServerName(java.lang.String s)
This method tests its input argument to see if it is in the proper format for a server; namely, "host:port". |
static java.lang.String |
escape(java.lang.String s)
This method takes a string and escapes most special, regular expression characters. |
static boolean |
matches(java.lang.String regexp,
java.lang.String s,
boolean escapeRegexp)
This method implements a simple wildcard matching scheme where "*" means any or no characters and "?" means exactly 1 character. |
static boolean |
matches(java.lang.String subject,
java.lang.String type,
cMsgGetHelper helper)
This method checks to see if there is a match between a subject & type pair and a subscribeAndGet helper object. |
static boolean |
matches(java.lang.String subject,
java.lang.String type,
cMsgSubscription sub)
This method checks to see if there is a match between a subject & type pair and a subscription. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public cMsgMessageMatcher()
Method Detail |
---|
public static boolean matches(java.lang.String regexp, java.lang.String s, boolean escapeRegexp)
regexp
- subscription string that can contain wildcards (* and ?)s
- message string to be matched (can be blank which only matches *)escapeRegexp
- if true, the regexp argument is escaped, else not
public static boolean matches(java.lang.String subject, java.lang.String type, cMsgGetHelper helper)
subject
- subjecttype
- typehelper
- subscription
public static boolean matches(java.lang.String subject, java.lang.String type, cMsgSubscription sub)
subject
- subjecttype
- typesub
- subscription
public static java.lang.String escape(java.lang.String s)
s
- string to be escaped
public static java.lang.String constructServerName(java.lang.String s) throws cMsgException
s
- input string of a possible server name
cMsgException
- if input string is not in the proper form (host:port)
or the host is unknown
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |