|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rice.pastry.standard.CertifiedNodeIdFactory
Builds nodeIds in a certified manner, guaranteeing that a given node will always have the same nodeId. NOTE: Actual certification is not yet implemented, rather, using this factory simply guarantees that the node's nodeId will never change.
Field Summary | |
protected Environment |
environment
DESCRIBE THE FIELD |
protected Logger |
logger
DESCRIBE THE FIELD |
static java.lang.String |
NODE_ID_FILENAME
DESCRIBE THE FIELD |
protected int |
port
DESCRIBE THE FIELD |
protected IPNodeIdFactory |
realFactory
DESCRIBE THE FIELD |
Constructor Summary | |
CertifiedNodeIdFactory(java.net.InetAddress localIP,
int port,
Environment env)
Constructor. |
Method Summary | |
static void |
generateCertificate(Id id,
java.io.OutputStream os,
java.security.PrivateKey key)
Method which generates a certificate given the nodeid, location, and private key |
Id |
generateNodeId()
generate a nodeId |
static java.lang.String |
getArg(java.lang.String[] args,
java.lang.String argType)
Gets the Arg attribute of the CertifiedNodeIdFactory class |
static void |
main(java.lang.String[] args)
Main method which, for convenience, allows certificate creation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int port
protected IPNodeIdFactory realFactory
protected Environment environment
protected Logger logger
public static java.lang.String NODE_ID_FILENAME
Constructor Detail |
public CertifiedNodeIdFactory(java.net.InetAddress localIP, int port, Environment env)
localIP
- DESCRIBE THE PARAMETERport
- DESCRIBE THE PARAMETERenv
- DESCRIBE THE PARAMETERMethod Detail |
public Id generateNodeId()
generateNodeId
in interface NodeIdFactory
public static java.lang.String getArg(java.lang.String[] args, java.lang.String argType)
args
- DESCRIBE THE PARAMETERargType
- DESCRIBE THE PARAMETER
public static void generateCertificate(Id id, java.io.OutputStream os, java.security.PrivateKey key)
id
- The id of the certificate to generatekey
- The private key to use to sign the resultos
- DESCRIBE THE PARAMETERpublic static void main(java.lang.String[] args) throws java.lang.Exception
args
- The command line arguments
java.lang.Exception
- DESCRIBE THE EXCEPTION
|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |