Project JXTA

net.jxta.impl.id.binaryID
Class ModuleSpecBinaryID

java.lang.Object
  extended bynet.jxta.id.ID
      extended bynet.jxta.platform.ModuleSpecID
          extended bynet.jxta.impl.id.binaryID.ModuleSpecBinaryID
All Implemented Interfaces:
Serializable

public final class ModuleSpecBinaryID
extends ModuleSpecID

A ModuleSpecID uniquely identifies a particular network behaviour (wire protocol and choregraphy) that may be embodied by a Jxta Module. There may be any number of implementations of a given SpecID. All such implementations are assumed to be network compatible.

The Specification that corresponds to a given ModuleSpecID may be published in a ModuleSpecAdvertisement. This advertisement is uniquely identified by the ModuleSpecID that it describes.

The various implementations of a given SpecID may be published in ModuleImplAdvertisements. These advertisements are identified by the ModuleSpecID that they implement and a compatibility statement. ModuleImplAdvertisements baring the same SpecID and compatibility statement are theorethicaly interchangeable. However they may be subsequently discriminated by a Description element.

A ModuleSpecID embeds a ModuleClassID which uniquely identifies a base Module class. A base module class defines a local behaviour and one API per compatible JXTA implementation.

A ModuleSpecID therefore uniquely identifies an abstract module, of which an implementation compatible with the local JXTA implementation may be located and instantiated.

In the standard PeerGroup implementation of the java reference implementation the various services are specified as a list of ModuleSpecID, for each of which the group locates and loads an implementation as part of the group's initialization.

Author:
Daniel Brookshier turbogeek@cluck.com
See Also:
PeerGroup, Module, ModuleClassID, ModuleSpecAdvertisement, ModuleImplAdvertisement, ID, Advertisement, Serialized Form

Field Summary
protected  BinaryID baseClassID
           
protected  BinaryID classID
           
protected  BinaryID specID
           
 
Fields inherited from class net.jxta.id.ID
nullID, URIEncodingName, URNNamespace
 
Constructor Summary
protected ModuleSpecBinaryID()
          Constructor.
protected ModuleSpecBinaryID(BinaryID classID, BinaryID baseClassID, BinaryID specID)
          Constructor.
protected ModuleSpecBinaryID(String id)
          Constructor.
 
Method Summary
 boolean equals(Object target)
          
 ModuleClassID getBaseClass()
          
 BinaryID getBaseClassID()
          Getter for property baseClassID.
 BinaryID getClassID()
          Getter for property classID.
 String getIDFormat()
          
 BinaryID getSpecID()
          Getter for property specID.
 Object getUniqueValue()
          
 URL getURL()
          
 int hashCode()
          
 boolean isOfSameBaseClass(ModuleClassID classId)
          
 boolean isOfSameBaseClass(ModuleSpecID specId)
          
 
Methods inherited from class net.jxta.id.ID
clone, create, toString, toURI
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

classID

protected BinaryID classID

baseClassID

protected BinaryID baseClassID

specID

protected BinaryID specID
Constructor Detail

ModuleSpecBinaryID

protected ModuleSpecBinaryID()
Constructor. Used only internally.

Since:
JXTA 1.0

ModuleSpecBinaryID

protected ModuleSpecBinaryID(String id)
Constructor. Intializes contents from provided ID.

Parameters:
id - the ID data
Since:
JXTA 1.0

ModuleSpecBinaryID

protected ModuleSpecBinaryID(BinaryID classID,
                             BinaryID baseClassID,
                             BinaryID specID)
Constructor. Creates a ModuleSpecID in a given class, with a given class unique id. A BinaryID of a class and another BinaryID are provided.

Since:
JXTA 1.0
Method Detail

equals

public boolean equals(Object target)


hashCode

public int hashCode()


getIDFormat

public String getIDFormat()


getUniqueValue

public Object getUniqueValue()


getURL

public URL getURL()


getBaseClass

public ModuleClassID getBaseClass()


isOfSameBaseClass

public boolean isOfSameBaseClass(ModuleClassID classId)


isOfSameBaseClass

public boolean isOfSameBaseClass(ModuleSpecID specId)


getClassID

public BinaryID getClassID()
Getter for property classID.

Returns:
Value of property classID.

getBaseClassID

public BinaryID getBaseClassID()
Getter for property baseClassID.

Returns:
Value of property baseClassID.

getSpecID

public BinaryID getSpecID()
Getter for property specID.

Returns:
Value of property specID.

JXTA J2SE