Rice Pastry API

rice.p2p.multiring
Class RingCertificate

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

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

Version:
$Id: RingCertificate.java 3613 2007-02-15 14:45:14Z jstewart $
Author:
Alan Mislove
See Also:
Serialized Form

Field Summary
protected  java.net.InetSocketAddress[] bootstraps
           
protected static java.util.HashMap CERTIFICATES
           
protected  Id id
           
protected  java.security.PublicKey key
           
protected  java.net.InetSocketAddress logServer
           
protected  java.lang.String name
           
protected  java.lang.Integer port
           
protected  java.lang.Integer protocol
           
protected  byte[] signature
           
protected  java.lang.Long version
           
 
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

CERTIFICATES

protected static java.util.HashMap CERTIFICATES

name

protected java.lang.String name

id

protected Id id

protocol

protected java.lang.Integer protocol

bootstraps

protected java.net.InetSocketAddress[] bootstraps

port

protected java.lang.Integer port

logServer

protected java.net.InetSocketAddress logServer

key

protected java.security.PublicKey key

version

protected java.lang.Long version

signature

protected byte[] signature
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

Method Detail

getCertificate

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

Parameters:
ringId - The id
Returns:
All certificate

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

Overrides:
toString in class java.lang.Object
Returns:
a string

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
Throws:
java.io.IOException
java.lang.ClassNotFoundException

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

Throws:
java.lang.Exception

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection