org.tranche.server
Class HostSignatureNonceWrapper

java.lang.Object
  extended by org.tranche.server.HostSignatureNonceWrapper

public class HostSignatureNonceWrapper
extends java.lang.Object

Helps organize signatures and nonces for certain propagated requests.

Author:
Bryan Smith - bryanesmith@gmail.com

Field Summary
 java.lang.String host
           
 byte[] nonce
           
 Signature sig
           
 
Constructor Summary
HostSignatureNonceWrapper(java.lang.String host, Signature sig, byte[] nonce)
          Helps organize signatures and nonces for certain propagated requests.
 
Method Summary
 boolean equals(java.lang.Object o)
          Can test for equality for any of following:
 int hashCode()
           
 boolean isHost(java.lang.String otherHost)
          Tests that other host is the same host for this wrapper.
 boolean isHostSignatureNonceWrapper(HostSignatureNonceWrapper otherWrapper)
          Tests that other wrapper has same host, signature and nonce.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

host

public final java.lang.String host

sig

public final Signature sig

nonce

public final byte[] nonce
Constructor Detail

HostSignatureNonceWrapper

public HostSignatureNonceWrapper(java.lang.String host,
                                 Signature sig,
                                 byte[] nonce)

Helps organize signatures and nonces for certain propagated requests.

Parameters:
host -
sig -
nonce -
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
Returns:

isHost

public boolean isHost(java.lang.String otherHost)

Tests that other host is the same host for this wrapper.

Note that equals method for class calls this method if parameter is of class String. See equals JavaDoc for this class for more information.

Parameters:
otherHost -
Returns:

isHostSignatureNonceWrapper

public boolean isHostSignatureNonceWrapper(HostSignatureNonceWrapper otherWrapper)

Tests that other wrapper has same host, signature and nonce.

Note that equals method for class calls this method if parameter is of class HostSignatureNonceWrapper. See equals JavaDoc for this class for more information.

Parameters:
otherWrapper -
Returns:

equals

public boolean equals(java.lang.Object o)

Can test for equality for any of following:

Overrides:
equals in class java.lang.Object
Parameters:
o -
Returns:
See Also:
isHost(java.lang.String), isHostSignatureNonceWrapper(org.tranche.server.HostSignatureNonceWrapper)


This code is free for use both commercially and non-commercially as stated in the project's license