Name
IDFactory
Synopsis
The IDFactory
class
creates different types of IDs. The static methods of this class
create known types of IDs (codat IDs, pipe IDs, etc.). The
fromURL( )
method creates these IDs based on the
protocol that is associated with each ID.
If
you want to create a new type of ID, you must provide a subclass of
the ID class and use the registerIDType( )
method
so that instances of the ID are known to the factory. You can then
use the fromURL( )
method to create instances of
the newly defined ID.
public final class IDFactory extends net.jxta.util.ClassFactory { // No Constructor // Inner Classes public static class Instantiator; // Public Class Methods public static ID fromURL(java.net.URL source) throws java.net.MalformedURLExceptionjava.net.UnknownServiceException; public static net.jxta.codat.CodatID newCodatID(net.jxta.peergroup.PeerGroupID groupID, InputStream in) throws IOException; public static net.jxta.platform.ModuleClassID newModuleClassID(); public static net.jxta.platform.ModuleClassID newModuleClassID(net.jxta.platform.ModuleClassID baseClass); public static net.jxta.platform.ModuleSpecID newModuleSpecID(net.jxta.platform.ModuleClassID baseClass); public static net.jxta.peergroup.PeerGroupID newPeerGroupID(); public static net.jxta.peer.PeerID newPeerID(net.jxta.peergroup.PeerGroupID groupID); public static net.jxta.pipe.PipeID newPipeID(net.jxta.peergroup.PeerGroupID groupID, byte[ ] seed); public static boolean registerIDType(int type, Class ...
Get JXTA in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.