javax.rad.remote.event
Class CallBackEvent

java.lang.Object
  extended by javax.rad.remote.event.CallBackEvent

public class CallBackEvent
extends Object

The CallBackEvent will be sent to an ICallBackListener if an asynchronous method call returns a result.

See Also:
ICallBackListener

Constructor Summary
CallBackEvent(String pObjectName, String pMethodName, Object pObject, Throwable pThrowable, long pRequest, long pResponse)
          Creates a new instance of CallBackEvent.
 
Method Summary
 String getMethodName()
          Returns the method name of the remote call.
 Object getObject()
          Gets the return value from a remote method call.
 String getObjectName()
          Returns the object name of the remote method call.
 long getRequestTime()
          Returns the time at which the remote method call was sent to the remote server.
 long getResponseTime()
          Returns the time which the result, from the remote server, was received.
 boolean isError()
          Determines if the result object is an exception, thrown by a call.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CallBackEvent

public CallBackEvent(String pObjectName,
                     String pMethodName,
                     Object pObject,
                     Throwable pThrowable,
                     long pRequest,
                     long pResponse)
Creates a new instance of CallBackEvent.

Parameters:
pObjectName - object name for the remote method call
pMethodName - method name for the remote call
pObject - result value from the server for the remote method call. If the method call returned a result, the exception is undefined!
pThrowable - exception from the server for the remote method call. If the method call returned an error, the result is undefined!
pRequest - request time of the remote method call, in millis
pResponse - response time fo the result, in millis
Method Detail

getObject

public Object getObject()
                 throws Throwable
Gets the return value from a remote method call.

Returns:
the return value from the remote server
Throws:
Throwable - if the remote method call throwed an error

isError

public boolean isError()
Determines if the result object is an exception, thrown by a call.

Returns:
true if the result object is an exception thrown by a call. false if the result of a call is an exception or the result had no errors

getObjectName

public String getObjectName()
Returns the object name of the remote method call.

Returns:
object name

getMethodName

public String getMethodName()
Returns the method name of the remote call.

Returns:
method name

getRequestTime

public long getRequestTime()
Returns the time at which the remote method call was sent to the remote server.

Returns:
time, in millis

getResponseTime

public long getResponseTime()
Returns the time which the result, from the remote server, was received.

Returns:
time in millis


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.