Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rice.pastry.standard
Class CertifiedNodeIdFactory

    java.lang.Object
      rice.pastry.standard.CertifiedNodeIdFactory

All Implemented Interfaces:
  NodeIdFactory

public class CertifiedNodeIdFactory
extends java.lang.Object
implements NodeIdFactory

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.

Version:
  $Id: CertifiedNodeIdFactory.java 2808 2005-11-22 14:38:49Z jeffh $
Author:
  Alan Mislove

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(NodeId id, java.io.OutputStream os, java.security.PrivateKey key)` Method which generates a certificate given the nodeid, location, and private key
`NodeId` | `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

### port

    protected int port

  DESCRIBE THE FIELD

### realFactory

    protected IPNodeIdFactory realFactory

  DESCRIBE THE FIELD

### environment

    protected Environment environment

  DESCRIBE THE FIELD

### logger

    protected Logger logger

  DESCRIBE THE FIELD

### NODE_ID_FILENAME

    public static java.lang.String NODE_ID_FILENAME

  DESCRIBE THE FIELD

Constructor Detail

### CertifiedNodeIdFactory

    public CertifiedNodeIdFactory(java.net.InetAddress localIP,
                                  int port,
                                  Environment env)

  Constructor.

Parameters:
  `localIP` - DESCRIBE THE PARAMETER
  `port` - DESCRIBE THE PARAMETER
  `env` - DESCRIBE THE PARAMETER

Method Detail

### generateNodeId

    public NodeId generateNodeId()

  generate a nodeId

  Specified by:
    `generateNodeId` in interface `NodeIdFactory`
  Returns:
    the new nodeId

### getArg

    public static java.lang.String getArg(java.lang.String[] args,
                                          java.lang.String argType)

  Gets the Arg attribute of the CertifiedNodeIdFactory class

  Parameters:
    `args` - DESCRIBE THE PARAMETER
    `argType` - DESCRIBE THE PARAMETER
  Returns:
    The Arg value

### generateCertificate

    public static void generateCertificate(NodeId id,
                                           java.io.OutputStream os,
                                           java.security.PrivateKey key)

  Method which generates a certificate given the nodeid, location, and private key

  Parameters:
    `id` - The id of the certificate to generate
    `key` - The private key to use to sign the result
    `os` - DESCRIBE THE PARAMETER

### main

    public static void main(java.lang.String[] args)
                     throws java.lang.Exception

  Main method which, for convenience, allows certificate creation. The parameters allowed are -ca [file] -out [dir]

  Parameters:
    `args` - The command line arguments
  Throws:
    `java.lang.Exception` - DESCRIBE THE EXCEPTION

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005 - Rice Pastry.