rice.p2p.commonapi
Interface IdFactory

All Known Implementing Classes:
PastryIdFactory

public interface IdFactory


Method Summary
 Id buildId(byte[] material)
          Builds a protocol-specific Id given the source data.
 Id buildId(int[] material)
          Builds a protocol-specific Id given the source data.
 Id buildId(java.lang.String string)
          Builds a protocol-specific Id by using the hash of the given string as source data.
 Id.Distance buildIdDistance(byte[] material)
          Builds a protocol-specific Id.Distance given the source data.
 IdRange buildIdRange(Id cw, Id ccw)
          Creates an IdRange given the CW and CCW ids.
 IdSet buildIdSet()
          Creates an empty IdSet.
 

Method Detail

buildId

public Id buildId(byte[] material)
Builds a protocol-specific Id given the source data.

Parameters:
material - The material to use
Returns:
The built Id.

buildId

public Id buildId(int[] material)
Builds a protocol-specific Id given the source data.

Parameters:
material - The material to use
Returns:
The built Id.

buildId

public Id buildId(java.lang.String string)
Builds a protocol-specific Id by using the hash of the given string as source data.

Parameters:
string - The string to use as source data
Returns:
The built Id.

buildIdDistance

public Id.Distance buildIdDistance(byte[] material)
Builds a protocol-specific Id.Distance given the source data.

Parameters:
material - The material to use
Returns:
The built Id.Distance.

buildIdRange

public IdRange buildIdRange(Id cw,
                            Id ccw)
Creates an IdRange given the CW and CCW ids.

Parameters:
cw - The clockwise Id
ccw - The counterclockwise Id
Returns:
An IdRange with the appropriate delimiters.

buildIdSet

public IdSet buildIdSet()
Creates an empty IdSet.

Returns:
an empty IdSet





Imprint-Dataprotection