|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sapia.ubik.mcast.DomainName
public class DomainName
Models a "domain name" that is expressed by a path. Allows to filter multicast events on a per-domain basis. Supports the notion of domain partition (where a domain can have subdomains - or partitions).
Partionning is expressed through a path notation, where the parent domain can "contain" subdomains (that necessarily include their parent's path).
This notion of containment is used to determine to which domain or partition in a domain a multicast event is destined. For example, an event that is multicast to domain "parent" will also be received by the following partitions "parent/partition1", "parent/partition2". Yet, the opposite would not be true: an event targeted at "parent/partition2" would not be received by the others - since the latter do not "contain" or "include" the former.
An instance of this class is created as follows:
DomainName dn = DomainName.parse("domain/partition");
Specifying subdomains/partitions is not mandatory.
| Field Summary | |
|---|---|
static char |
DELIM
|
| Method Summary | |
|---|---|
boolean |
contains(DomainName other)
Returns true if this instance "contains" or "includes"
the domain name passed in. |
boolean |
equals(java.lang.Object other)
Compares this instance with another DomainName. |
java.lang.String |
get(int i)
Returns the component whose index is given. |
static DomainName |
parse(java.lang.String name)
Creates an instance of this class out of the given name/path. |
int |
size()
Returns the number of "components" in this instance's name. |
java.lang.String |
toString()
Returns a string representation of this instance - or, more precisely, this instance's path representation, where subdomains/partitions are separated by '/' characters. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final char DELIM
| Method Detail |
|---|
public int size()
public java.lang.String get(int i)
i - an index.
public static DomainName parse(java.lang.String name)
a - domain name/path.
DomainName object.public boolean contains(DomainName other)
true if this instance "contains" or "includes"
the domain name passed in.
other - a DomainName.public boolean equals(java.lang.Object other)
DomainName.
equals in class java.lang.Objectan - Object.
true if the passed in object is a
DomainName instance and if it has the same domain name
string as this instance's.public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||