org.tranche.server
Class PropagationExceptionWrapper

java.lang.Object
  extended by org.tranche.server.PropagationExceptionWrapper
All Implemented Interfaces:
java.io.Serializable

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

Associate an exception with a particular host.

Author:
Bryan Smith - bryanesmith@gmail.com, James "Augie" Hill - augman85@gmail.com
See Also:
Serialized Form

Field Summary
 java.lang.Exception exception
           
 BigHash hash
           
 java.lang.String host
           
 int version
           
static int VERSION_LATEST
           
static int VERSION_ONE
           
 
Constructor Summary
PropagationExceptionWrapper(java.lang.Exception exception)
           
PropagationExceptionWrapper(java.lang.Exception exception, BigHash hash)
           
PropagationExceptionWrapper(java.lang.Exception exception, java.lang.String host)
          Associate an exception with a particular host.
PropagationExceptionWrapper(java.lang.Exception exception, java.lang.String host, BigHash hash)
           
PropagationExceptionWrapper(java.io.InputStream in)
           
PropagationExceptionWrapper(int version, java.lang.Exception exception, java.lang.String host, BigHash hash)
           
 
Method Summary
static PropagationExceptionWrapper deserialize(byte[] bytes)
           
 void serialize(java.io.OutputStream out)
           
 void serializeVersionOne(java.io.OutputStream out)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VERSION_ONE

public static final int VERSION_ONE
See Also:
Constant Field Values

VERSION_LATEST

public static final int VERSION_LATEST
See Also:
Constant Field Values

version

public final int version

host

public final java.lang.String host

hash

public final BigHash hash

exception

public final java.lang.Exception exception
Constructor Detail

PropagationExceptionWrapper

public PropagationExceptionWrapper(java.lang.Exception exception)
Parameters:
exception -

PropagationExceptionWrapper

public PropagationExceptionWrapper(java.lang.Exception exception,
                                   java.lang.String host)

Associate an exception with a particular host.

Parameters:
exception -
host -

PropagationExceptionWrapper

public PropagationExceptionWrapper(java.lang.Exception exception,
                                   BigHash hash)
Parameters:
exception -
hash -

PropagationExceptionWrapper

public PropagationExceptionWrapper(java.lang.Exception exception,
                                   java.lang.String host,
                                   BigHash hash)
Parameters:
exception -
host -
hash -

PropagationExceptionWrapper

public PropagationExceptionWrapper(int version,
                                   java.lang.Exception exception,
                                   java.lang.String host,
                                   BigHash hash)
Parameters:
version -
exception -
host -
hash -

PropagationExceptionWrapper

public PropagationExceptionWrapper(java.io.InputStream in)
                            throws java.io.IOException
Parameters:
in -
Throws:
java.io.IOException
Method Detail

toString

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

deserialize

public static PropagationExceptionWrapper deserialize(byte[] bytes)
                                               throws java.io.IOException
Parameters:
bytes -
Returns:
Throws:
java.io.IOException

serialize

public void serialize(java.io.OutputStream out)
               throws java.io.IOException
Parameters:
out -
Throws:
java.io.IOException

serializeVersionOne

public void serializeVersionOne(java.io.OutputStream out)
                         throws java.io.IOException
Parameters:
out -
Throws:
java.io.IOException


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