anon.tor.ordescription
Class ORDescription

java.lang.Object
  extended by anon.tor.ordescription.ORDescription

public class ORDescription
extends java.lang.Object


Field Summary
private  java.util.Vector family
           
private  ORAcl m_acl
           
private  java.lang.String m_address
           
private  boolean m_bIsExitNode
           
private  java.lang.String m_name
           
private  MyRSAPublicKey m_onionkey
           
private  int m_port
           
private  int m_portDir
           
private  MyRSAPublicKey m_signingkey
           
private  java.lang.String m_strSoftware
           
 
Constructor Summary
ORDescription(java.lang.String address, java.lang.String name, int port, java.lang.String strSoftware)
          Constructor
 
Method Summary
 ORAcl getAcl()
          gets the ACL for this onion router
 java.lang.String getAddress()
          gets the address of the OR
 int getDirPort()
          gets the port of the directory server
 java.lang.String getName()
          gets the name of the OR
 MyRSAPublicKey getOnionKey()
          gets the onionkey
 int getPort()
          gets the port
 MyRSAPublicKey getSigningKey()
          gets the signing key
 java.lang.String getSoftware()
          gets the software version of this OR
 boolean isExitNode()
          returns if this server is an exit node
 boolean isSimilar(java.lang.Object onionrouter)
          test if two OR's are identical returns also true, if the routers are in the same family
static ORDescription parse(java.io.LineNumberReader reader)
          Tries to parse an router specification according to the desing document.
 void setAcl(ORAcl acl)
          sets the ACL for this onion router
 void setDirPort(int port)
          sets the port of the directory server
 void setExitNode(boolean bIsExitNode)
          sets this server as exit node or not
 void setFamily(java.util.Vector fam)
           
 boolean setOnionKey(byte[] onionkey)
          sets the onionkey for this OR
 boolean setSigningKey(byte[] signingkey)
          sets the signing key
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_address

private java.lang.String m_address

m_name

private java.lang.String m_name

m_port

private int m_port

m_portDir

private int m_portDir

m_strSoftware

private java.lang.String m_strSoftware

m_acl

private ORAcl m_acl

m_bIsExitNode

private boolean m_bIsExitNode

m_onionkey

private MyRSAPublicKey m_onionkey

m_signingkey

private MyRSAPublicKey m_signingkey

family

private java.util.Vector family
Constructor Detail

ORDescription

public ORDescription(java.lang.String address,
                     java.lang.String name,
                     int port,
                     java.lang.String strSoftware)
Constructor

Parameters:
address - address of the onion router
name - name for the onion router
port - port
strSoftware - version of the onion router software
Method Detail

setExitNode

public void setExitNode(boolean bIsExitNode)
sets this server as exit node or not

Parameters:
bIsExitNode -

setFamily

public void setFamily(java.util.Vector fam)

isExitNode

public boolean isExitNode()
returns if this server is an exit node

Returns:

setAcl

public void setAcl(ORAcl acl)
sets the ACL for this onion router

Parameters:
acl - ACL

getAcl

public ORAcl getAcl()
gets the ACL for this onion router

Returns:
ACL

setOnionKey

public boolean setOnionKey(byte[] onionkey)
sets the onionkey for this OR

Parameters:
onionkey - onionkey
Returns:
true if the key is a rsa key

getOnionKey

public MyRSAPublicKey getOnionKey()
gets the onionkey

Returns:
onionkey

setSigningKey

public boolean setSigningKey(byte[] signingkey)
sets the signing key

Parameters:
signingkey - signing key
Returns:
true if the key is a rsa key

getSigningKey

public MyRSAPublicKey getSigningKey()
gets the signing key

Returns:
signing key

getAddress

public java.lang.String getAddress()
gets the address of the OR

Returns:
address

getName

public java.lang.String getName()
gets the name of the OR

Returns:
name

setDirPort

public void setDirPort(int port)
sets the port of the directory server

Parameters:
port - port

getPort

public int getPort()
gets the port

Returns:
port

getDirPort

public int getDirPort()
gets the port of the directory server

Returns:
port

getSoftware

public java.lang.String getSoftware()
gets the software version of this OR

Returns:
software version

isSimilar

public boolean isSimilar(java.lang.Object onionrouter)
test if two OR's are identical returns also true, if the routers are in the same family

Parameters:
or - OR
Returns:

parse

public static ORDescription parse(java.io.LineNumberReader reader)
Tries to parse an router specification according to the desing document.

Parameters:
reader - reader

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object