Rice Pastry API

rice.p2p.multiring
Class RingCertificate

java.lang.Object
  extended byrice.p2p.multiring.RingCertificate
All Implemented Interfaces:
java.io.Serializable

public class RingCertificate
extends java.lang.Object
implements java.io.Serializable

Version:
$Id: RingCertificate.java 2828 2005-12-02 17:50:01Z jstewart $
Author:
Alan Mislove
See Also:
Serialized Form

Field Summary
protected  java.net.InetSocketAddress[] bootstraps
          DESCRIBE THE FIELD
protected static java.util.HashMap CERTIFICATES
          DESCRIBE THE FIELD
protected  Id id
          DESCRIBE THE FIELD
protected  java.security.PublicKey key
          DESCRIBE THE FIELD
protected  java.net.InetSocketAddress logServer
          DESCRIBE THE FIELD
protected  java.lang.String name
          DESCRIBE THE FIELD
protected  java.lang.Integer port
          DESCRIBE THE FIELD
protected  java.lang.Integer protocol
          DESCRIBE THE FIELD
protected  byte[] signature
          DESCRIBE THE FIELD
protected  java.lang.Long version
          DESCRIBE THE FIELD
 
Constructor Summary
RingCertificate(java.lang.String name, Id id, int protocol, java.net.InetSocketAddress[] bootstraps, int port, java.security.PublicKey key, java.net.InetSocketAddress logServer)
          Builds a new RingCertificate given the appropriate info
 
Method Summary
 java.net.InetSocketAddress[] getBootstraps()
          Returns the bootstraps of this ring
static RingCertificate getCertificate(Id ringId)
          Method which returns the certificates found for the given ringId
 Id getId()
          Returns the id of this ring
 java.security.PublicKey getKey()
          Returns the public key which is used to authenticate
 java.net.InetSocketAddress getLogServer()
          Returns the log server of this ring
 java.lang.String getName()
          Returns the name of this ring
 int getPort()
          Returns the preferred port of this ring
 int getProtocol()
          Returns the protcol of this ring
 long getVersion()
          Returns the version of this ring cert
static void main(java.lang.String[] args)
          Main method which, as a utility, generates a RingCertificate by asking the user for prompts
static java.security.KeyPair readKeyPair(java.lang.String ring, java.lang.String pass)
          Internal method which writes out the keypair to a file, encrypted
 java.lang.String toString()
          Returns a string of this object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
DESCRIBE THE FIELD


id

protected Id id
DESCRIBE THE FIELD


protocol

protected java.lang.Integer protocol
DESCRIBE THE FIELD


bootstraps

protected java.net.InetSocketAddress[] bootstraps
DESCRIBE THE FIELD


port

protected java.lang.Integer port
DESCRIBE THE FIELD


logServer

protected java.net.InetSocketAddress logServer
DESCRIBE THE FIELD


key

protected java.security.PublicKey key
DESCRIBE THE FIELD


version

protected java.lang.Long version
DESCRIBE THE FIELD


signature

protected byte[] signature
DESCRIBE THE FIELD


CERTIFICATES

protected static java.util.HashMap CERTIFICATES
DESCRIBE THE FIELD

Constructor Detail

RingCertificate

public RingCertificate(java.lang.String name,
                       Id id,
                       int protocol,
                       java.net.InetSocketAddress[] bootstraps,
                       int port,
                       java.security.PublicKey key,
                       java.net.InetSocketAddress logServer)
Builds a new RingCertificate given the appropriate info

Parameters:
name - DESCRIBE THE PARAMETER
id - DESCRIBE THE PARAMETER
protocol - DESCRIBE THE PARAMETER
bootstraps - DESCRIBE THE PARAMETER
port - DESCRIBE THE PARAMETER
key - DESCRIBE THE PARAMETER
logServer - DESCRIBE THE PARAMETER
Method Detail

getName

public java.lang.String getName()
Returns the name of this ring

Returns:
The name

getId

public Id getId()
Returns the id of this ring

Returns:
The id

getProtocol

public int getProtocol()
Returns the protcol of this ring

Returns:
The protocol

getVersion

public long getVersion()
Returns the version of this ring cert

Returns:
The version

getBootstraps

public java.net.InetSocketAddress[] getBootstraps()
Returns the bootstraps of this ring

Returns:
The bootstraps

getPort

public int getPort()
Returns the preferred port of this ring

Returns:
The preferred port

getKey

public java.security.PublicKey getKey()
Returns the public key which is used to authenticate

Returns:
The public key

getLogServer

public java.net.InetSocketAddress getLogServer()
Returns the log server of this ring

Returns:
The log server

toString

public java.lang.String toString()
Returns a string of this object

Returns:
a string

getCertificate

public static RingCertificate getCertificate(Id ringId)
Method which returns the certificates found for the given ringId

Parameters:
ringId - The id
Returns:
All certificate

readKeyPair

public static java.security.KeyPair readKeyPair(java.lang.String ring,
                                                java.lang.String pass)
                                         throws java.io.IOException,
                                                java.lang.ClassNotFoundException
Internal method which writes out the keypair to a file, encrypted

Parameters:
pass - THe password
ring - The ring name
Returns:
DESCRIBE THE RETURN VALUE
Throws:
java.io.IOException - DESCRIBE THE EXCEPTION
java.lang.ClassNotFoundException - DESCRIBE THE EXCEPTION

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Main method which, as a utility, generates a RingCertificate by asking the user for prompts

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

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection