org.sapia.ubik.rmi.server
Class ClientRuntime

java.lang.Object
  extended by org.sapia.ubik.rmi.server.ClientRuntime

public class ClientRuntime
extends java.lang.Object

Implements Ubik RMI's client-side runtime environment. This class' main task is to manage remote references and client-side interceptors.

Author:
Yanick Duchesne
Copyright:
Copyright © 2002-2003 Sapia Open Source Software. All Rights Reserved.
License:
Read the license.txt file of the jar or visit the license page at the Sapia OSS web site

Field Summary
 MultiDispatcher dispatcher
          The dispatcher of events destined to be intercepted by Interceptor instances.
 
Method Summary
 void addInterceptor(java.lang.Class eventClass, Interceptor it)
          Adds a client-side interceptor to this client.
 void dispatchEvent(Event event)
          Dispatches the given event to registered interceptors.
 ServerAddress getCallbackAddress(java.lang.String transportType)
          Returns this client's call-back server address (corresponds to the this client's singleton server, which will process incoming responses).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dispatcher

public final MultiDispatcher dispatcher
The dispatcher of events destined to be intercepted by Interceptor instances. Dispatches client-side events. This mechanism can conveniently be used by client apps to dispatch their own custom events.

See Also:
Interceptor
Method Detail

getCallbackAddress

public ServerAddress getCallbackAddress(java.lang.String transportType)
                                 throws java.lang.IllegalStateException
Returns this client's call-back server address (corresponds to the this client's singleton server, which will process incoming responses).

Returns:
this client's ServerAddress for call-backs.
Throws:
java.lang.IllegalStateException - if this client does not allow call-backs.
See Also:
Consts.CALLBACK_ENABLED

addInterceptor

public void addInterceptor(java.lang.Class eventClass,
                           Interceptor it)
                    throws InvalidInterceptorException
Adds a client-side interceptor to this client.

Throws:
InvalidInterceptorException
See Also:
Interceptor, MultiDispatcher.addInterceptor(Class, Interceptor)

dispatchEvent

public void dispatchEvent(Event event)
Dispatches the given event to registered interceptors.

See Also:
Interceptor, MultiDispatcher.addInterceptor(Class, Interceptor)


Copyright © 2010 Sapia OSS. All Rights Reserved.