Project JXTA

net.jxta.id
Interface IDFactory.URIInstantiator

All Superinterfaces:
IDFactory.Instantiator
Enclosing interface:
IDFactory

public static interface IDFactory.URIInstantiator
extends IDFactory.Instantiator

Extended instantiator which provides for construction from URIs and from scheme specific URN fragments. ID Formats are not required to implement this interface, but doing so will improve performance in many cases. When the deprecated URL based calls are removed these methods will be added to the primary interface and this interface will be deprecated.


Method Summary
 ID fromURI(URI source)
          Construct a new ID instance from a JXTA ID contained in a URI.
 ID fromURNNamespaceSpecificPart(String source)
          Construct a new ID instance from the scheme specific portion of a jxta URN.
 
Methods inherited from interface net.jxta.id.IDFactory.Instantiator
fromURL, getSupportedIDFormat, newCodatID, newCodatID, newCodatID, newCodatID, newModuleClassID, newModuleClassID, newModuleSpecID, newPeerGroupID, newPeerGroupID, newPeerGroupID, newPeerGroupID, newPeerID, newPeerID, newPipeID, newPipeID
 

Method Detail

fromURI

public ID fromURI(URI source)
           throws URISyntaxException
Construct a new ID instance from a JXTA ID contained in a URI.

Parameters:
source - URI which will be decoded to create a new ID instance.
Returns:
ID containing the new ID instance initialized from the source.
Throws:
URISyntaxException - if the URI provided is not a valid, recognized JXTA URI.

fromURNNamespaceSpecificPart

public ID fromURNNamespaceSpecificPart(String source)
                                throws URISyntaxException
Construct a new ID instance from the scheme specific portion of a jxta URN.

Parameters:
source - the scheme specific portion of a jxta URN.
Returns:
ID containing the new ID instance initialized from the source.
Throws:
URISyntaxException - if the URI provided is not a valid, recognized JXTA URI.

JXTA J2SE