|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.livetribe.slp.Scopes
public class Scopes
Scopes are case insensitive string labels used to group together related services.
Both DirectoryAgent and ServiceAgent have assigned one or more scopes so that they can advertise services
belonging to the scopes they've been assigned. The scope assigned by default to DirectoryAgents and
UserAgents is the DEFAULT
scope.
Field Summary | |
---|---|
static Scopes |
DEFAULT
The DEFAULT scope is just like any other scope, only that's used by DirectoryAgents and
ServiceAgents as their default scope. |
static Scopes |
WILDCARD
The WILDCARD scope is special, as it does not match any scope, and all other scopes will match it. |
Constructor Summary | |
---|---|
Scopes(String[] scopes)
Creates a Scopes object containing the given scope strings. |
Method Summary | |
---|---|
String[] |
asStringArray()
Returns the scope strings contained by this Scopes object. |
boolean |
equals(Object obj)
|
int |
hashCode()
|
boolean |
isDefaultScope()
Returns true if this Scopes object is the default scope, false otherwise. |
boolean |
isWildcardScope()
Returns true if this Scopes object is the wildcard scope, false otherwise. |
boolean |
match(Scopes other)
Matches the given Scopes argument against this Scopes object. |
String |
toString()
|
boolean |
weakMatch(Scopes other)
Matches the given Scopes argument against this Scopes object,
more weakly than match(Scopes) . |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Scopes DEFAULT
DEFAULT
scope is just like any other scope, only that's used by DirectoryAgents and
ServiceAgents as their default scope.
WILDCARD
public static final Scopes WILDCARD
DEFAULT
Constructor Detail |
---|
public Scopes(String[] scopes)
Scopes
object containing the given scope strings.
scopes
- The scope strings to be contained by this Scopes
objectMethod Detail |
---|
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public boolean match(Scopes other)
Scopes
argument against this Scopes
object.
If this Scopes
is the wildcard scope, always returns false.
If the given Scopes
is the wildcard scope, always returns true.
other
- The Scopes
to match
Scopes
argument
are also scopes of this Scopes
object.weakMatch(Scopes)
public boolean weakMatch(Scopes other)
Scopes
argument against this Scopes
object,
more weakly than match(Scopes)
.
If this Scopes
is the wildcard scope, always returns false.
If the given Scopes
is the wildcard scope, always returns true.
other
- The Scopes
to match
Scopes
argument
is also a scope of this Scopes
object.match(Scopes)
public String[] asStringArray()
Scopes
object.
public boolean isWildcardScope()
Scopes
object is the wildcard scope, false otherwise.
WILDCARD
public boolean isDefaultScope()
Scopes
object is the default scope, false otherwise.
DEFAULT
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |