jgroup.relacs.gmi
Class InvocationResult

java.lang.Object
  extended by jgroup.relacs.gmi.InvocationResult
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

public final class InvocationResult
extends java.lang.Object
implements java.io.Externalizable

Encapsulates invocation results and the server-side view identifier at the time of result generation.

Author:
Tor Arve Stangeland, Hein Meling
See Also:
Serialized Form

Field Summary
static int INVOCATION_BLOCKED
          Indicates that the invocation completed, and a result will follow.
static int INVOCATION_COMPLETED
          Indicates that the invocation completed, and a result will follow.
static int INVOCATION_FAILED
          Indicates that the invocation failed with the attached exception.
static int UNKNOWN_INVOCATION_SEMANTICS
          Indicates that the invocation could not be performed since it had an unknown invocation semantics for the given request.
 
Constructor Summary
InvocationResult()
          Empty constructor for externalizable
InvocationResult(java.lang.reflect.Method m, java.lang.Object[] args, java.lang.Object o, View serverView, long clientViewId)
          Invokes method m on object o with the provided arguments.
InvocationResult(java.rmi.RemoteException e)
           
 
Method Summary
 void readExternal(java.io.ObjectInput in)
           
 java.lang.String toString()
           
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INVOCATION_COMPLETED

public static final int INVOCATION_COMPLETED
Indicates that the invocation completed, and a result will follow.

See Also:
Constant Field Values

INVOCATION_BLOCKED

public static final int INVOCATION_BLOCKED
Indicates that the invocation completed, and a result will follow.

See Also:
Constant Field Values

INVOCATION_FAILED

public static final int INVOCATION_FAILED
Indicates that the invocation failed with the attached exception.

See Also:
Constant Field Values

UNKNOWN_INVOCATION_SEMANTICS

public static final int UNKNOWN_INVOCATION_SEMANTICS
Indicates that the invocation could not be performed since it had an unknown invocation semantics for the given request.

See Also:
Constant Field Values
Constructor Detail

InvocationResult

public InvocationResult()
Empty constructor for externalizable


InvocationResult

public InvocationResult(java.lang.reflect.Method m,
                        java.lang.Object[] args,
                        java.lang.Object o,
                        View serverView,
                        long clientViewId)
                 throws java.lang.IllegalArgumentException,
                        java.lang.IllegalAccessException
Invokes method m on object o with the provided arguments. The method may return a result which is stored in the result field of this object, or it may return an exception. The latter is also stored in the result field, but in addition the boolean field isException is set to true.

Parameters:
m - Method to invoke
args - Arguments to method m
o - Object to invoke method on
serverView - The server-side view in which the method was invoked
clientViewId - The client-side view in which this method was invoked
Throws:
java.lang.IllegalArgumentException
java.lang.IllegalAccessException

InvocationResult

public InvocationResult(java.rmi.RemoteException e)
Method Detail

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

toString

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


Copyright © 1998-2006 The Jgroup/ARM development team. All Rights Reserved.