org.apache.geronimo.interceptor
Class SimpleInvocationResult

java.lang.Object
  extended by org.apache.geronimo.interceptor.SimpleInvocationResult
All Implemented Interfaces:
Serializable, InvocationResult

public class SimpleInvocationResult
extends Object
implements InvocationResult, Serializable

See Also:
Serialized Form

Constructor Summary
SimpleInvocationResult(boolean normal, Object result)
          Create a object representing the normal result of an Invocation
 
Method Summary
 Exception getException()
          Get the application exception raised by the invocation.
 Object getResult()
          Get the return value from the invocation.
 boolean isException()
          Was an application exception raised by the invocation?
 boolean isNormal()
          Was this a normal completion (return)?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleInvocationResult

public SimpleInvocationResult(boolean normal,
                              Object result)
Create a object representing the normal result of an Invocation

Parameters:
normal - true if the target returned; false if it threw an application Exception
result - the result or Exception
Method Detail

isNormal

public boolean isNormal()
Description copied from interface: InvocationResult
Was this a normal completion (return)?

Specified by:
isNormal in interface InvocationResult
Returns:
true if the invocation returned; false if a declared exception was thrown

isException

public boolean isException()
Description copied from interface: InvocationResult
Was an application exception raised by the invocation? Note, this indicates a checked application exception was thrown; this will never contain a system exception

Specified by:
isException in interface InvocationResult
Returns:
true if a declared exception was thrown; false if the invocation returned

getResult

public Object getResult()
Description copied from interface: InvocationResult
Get the return value from the invocation. It is an error to call this method if the invocation is not complete normally.

Specified by:
getResult in interface InvocationResult
Returns:
the return value from the invocation; null if the operation was void

getException

public Exception getException()
Description copied from interface: InvocationResult
Get the application exception raised by the invocation. It is an error to call this method if the invocation did not raise an exception

Specified by:
getException in interface InvocationResult
Returns:
the checked Exception raised by the application


Copyright © 2003-2008 The Apache Geronimo development community. All Rights Reserved.