|
JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.id.ID
public abstract class ID
IDs are used to uniquely identify peers, peer groups, pipes and other types of objects manipulated by the JXTA APIs.
IDFactory
,
CodatID
,
PeerID
,
PeerGroupID
,
PipeID
,
ModuleClassID
,
ModuleSpecID
,
JXTA Protocols Specification : IDs,
Serialized FormField Summary | |
---|---|
static ID |
nullID
The null ID. |
static String |
URIEncodingName
This defines the URI scheme that we will be using to present JXTA IDs. |
static String |
URNNamespace
This defines the URN Namespace that we will be using to present JXTA IDs. |
Constructor Summary | |
---|---|
protected |
ID()
Constructor for IDs. |
Method Summary | |
---|---|
static ID |
create(URI fromURI)
Creates an ID by parsing the given URI. |
abstract String |
getIDFormat()
Returns a string identifier which indicates which ID format is used by this ID instance. |
abstract Object |
getUniqueValue()
Returns an object containing the unique value of the ID. |
URL |
getURL()
Deprecated. URIs are now the preferred way of manipulating IDs |
protected ID |
intern()
Returns a canonical representation for the ID object. |
String |
toString()
Returns a string representation of the ID. |
URI |
toURI()
Returns a URI representation of the ID. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String URIEncodingName
public static final String URNNamespace
public static final ID nullID
Constructor Detail |
---|
protected ID()
IDFactory
or
create(URI)
.
Method Detail |
---|
public static ID create(URI fromURI)
This convenience factory method works as if by invoking the
IDFactory.fromURI(URI)
method; any URISyntaxException
thrown is caught and wrapped in a new IllegalArgumentException
object, which is then thrown.
This method is provided for use in situations where it is known that
the given string is a legal ID, for example for ID constants declared
within in a program, and so it would be considered a programming error
for the URI not to parse as such. The IDFactory
, which throws
URISyntaxException
directly, should be used situations where a
ID is being constructed from user input or from some other source that
may be prone to errors.
fromURI
- The URI to be parsed into an ID
NullPointerException
- If fromURI is null
IllegalArgumentException
- If the given URI is not a valid ID.public String toString()
toURI()
.
The default implementation is the toString()
of the ID
represented as a URI.
toString
in class Object
public abstract String getIDFormat()
public abstract Object getUniqueValue()
this
.
@Deprecated public URL getURL()
JXTA ID Factory
can be used to construct
ID Objects from URLs containing JXTA IDs.
IDFactory.fromURL( java.net.URL )
protected ID intern()
public URI toURI()
URIs
are
the preferred way of externalizing and presenting JXTA IDs. The
JXTA ID Factory
can be used to construct
ID Objects from URIs containing JXTA IDs.
IDFactory.fromURI( java.net.URI )
|
JXSE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |