|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tranche.server.PropagationReturnWrapper
public class PropagationReturnWrapper
Since propagation must return information about which servers fail, we need to wrap return types and exceptions together.
| Field Summary | |
|---|---|
static byte |
FLAG_BOOLEAN
|
static byte |
FLAG_BYTE_1D
|
static byte |
FLAG_BYTE_2D
|
static byte |
FLAG_BYTE_3D
|
static byte |
FLAG_VOID
|
static int |
VERSION_LATEST
|
static int |
VERSION_ONE
|
| Constructor Summary | |
|---|---|
PropagationReturnWrapper(java.io.InputStream in)
|
|
PropagationReturnWrapper(java.util.Set<PropagationExceptionWrapper> set)
Since propagation must return information about which servers fail, we need to wrap return types and exceptions together. |
|
PropagationReturnWrapper(java.util.Set<PropagationExceptionWrapper> set,
java.lang.Object returnObj)
Since propagation must return information about which servers fail, we need to wrap return types and exceptions together. |
|
| Method Summary | |
|---|---|
static PropagationReturnWrapper |
createFromBytes(byte[] bytes)
|
java.util.Set<PropagationExceptionWrapper> |
getErrors()
Returns collection of errors that occurred while propogating request. |
java.lang.Object |
getReturnValueObject()
Returns the returned value from method. |
boolean |
isAnyErrors()
Returns true if there were any errors while propogating request. |
boolean |
isBoolean()
Returns true if and only if method return boolean value. |
boolean |
isByteArrayDoubleDimension()
Returns true if and only if return type of byte[][] |
boolean |
isByteArraySingleDimension()
Returns true if and only if return type of byte[] |
boolean |
isByteArrayTripleDimension()
Returns true if and only if return type of byte[][][] |
boolean |
isVoid()
Returns true if and only if method is void. |
void |
serialize(java.io.OutputStream out)
|
void |
serializeVersionOne(java.io.OutputStream out)
|
byte[] |
toByteArray()
|
java.lang.String |
toString()
Useful for troubleshooting. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int VERSION_ONE
public static final int VERSION_LATEST
public static final byte FLAG_VOID
public static final byte FLAG_BOOLEAN
public static final byte FLAG_BYTE_1D
public static final byte FLAG_BYTE_2D
public static final byte FLAG_BYTE_3D
| Constructor Detail |
|---|
public PropagationReturnWrapper(java.util.Set<PropagationExceptionWrapper> set)
Since propagation must return information about which servers fail, we need to wrap return types and exceptions together.
Use this constructor when method is void return type.
set - Set of exceptions. Is usually empty.
public PropagationReturnWrapper(java.util.Set<PropagationExceptionWrapper> set,
java.lang.Object returnObj)
Since propagation must return information about which servers fail, we need to wrap return types and exceptions together.
Use this constructor when method returns a value. (Use other constructor if void).
Do not set a null value if there is a return type. If method returns a null value, create an empty array or throw a NullPointerException.
set - Set of exceptions. Is usually empty.returnObj - If null, then treated as void; otherwise, this is the return object of type Boolean, byte[], byte[][], or byte[][][]
public PropagationReturnWrapper(java.io.InputStream in)
throws java.io.IOException
in -
java.io.IOException| Method Detail |
|---|
public boolean isAnyErrors()
Returns true if there were any errors while propogating request.
public java.util.Set<PropagationExceptionWrapper> getErrors()
Returns collection of errors that occurred while propogating request.
isAnyErrors()public boolean isVoid()
Returns true if and only if method is void.
public boolean isBoolean()
Returns true if and only if method return boolean value.
public boolean isByteArraySingleDimension()
Returns true if and only if return type of byte[]
public boolean isByteArrayDoubleDimension()
Returns true if and only if return type of byte[][]
public boolean isByteArrayTripleDimension()
Returns true if and only if return type of byte[][][]
public java.lang.Object getReturnValueObject()
Returns the returned value from method. Note you will have to type case this value.
public void serialize(java.io.OutputStream out)
throws java.io.IOException
java.io.IOException
public void serializeVersionOne(java.io.OutputStream out)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String toString()
Useful for troubleshooting.
toString in class java.lang.Object
public byte[] toByteArray()
throws java.io.IOException
java.io.IOException
public static PropagationReturnWrapper createFromBytes(byte[] bytes)
throws java.io.IOException
bytes -
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||