javax.rad.remote.event
Class CallBackEvent

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

public class CallBackEvent
extends java.lang.Object

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

See Also:
ICallBackListener

Constructor Summary
CallBackEvent(java.lang.Object pSource, java.lang.String pObjectName, java.lang.String pMethodName, java.lang.Object pObject, java.lang.Throwable pThrowable, long pRequest, long pResponse)
          Creates a new instance of CallBackEvent.
 
Method Summary
 java.lang.String getMethodName()
          Returns the method name of the remote call.
 java.lang.Object getObject()
          Gets the return value from a remote method call.
 java.lang.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.
 java.lang.Object getSource()
          Gets the source object of this event.
 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(java.lang.Object pSource,
                     java.lang.String pObjectName,
                     java.lang.String pMethodName,
                     java.lang.Object pObject,
                     java.lang.Throwable pThrowable,
                     long pRequest,
                     long pResponse)
Creates a new instance of CallBackEvent.

Parameters:
pSource - the event source
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

getSource

public java.lang.Object getSource()
Gets the source object of this event.

Returns:
the source object

getObject

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

Returns:
the return value from the remote server
Throws:
java.lang.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 java.lang.String getObjectName()
Returns the object name of the remote method call.

Returns:
object name

getMethodName

public java.lang.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.