org.sapia.ubik.rmi.interceptor
Class MultiDispatcher

java.lang.Object
  extended by org.sapia.ubik.rmi.interceptor.MultiDispatcher

public class MultiDispatcher
extends java.lang.Object

This dispatcher allows to register multiple interceptors for a given event.

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

Constructor Summary
MultiDispatcher()
           
 
Method Summary
 void addInterceptor(java.lang.Class event, Interceptor it)
          Adds an interceptor for the given event type.
 void dispatch(Event event)
          Dispatches the given event to all interceptors that have registered for the event's class.
protected  void handleError(java.lang.Throwable t)
          Template method that is called internally when an error is trapped when invoking the call-back method on a given interceptor instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiDispatcher

public MultiDispatcher()
Method Detail

addInterceptor

public void addInterceptor(java.lang.Class event,
                           Interceptor it)
                    throws InvalidInterceptorException
Adds an interceptor for the given event type.

Parameters:
event - an event class.
it - an Interceptor instance.
Throws:
InvalidInterceptorException - if the interceptor could not be added.

dispatch

public void dispatch(Event event)
Dispatches the given event to all interceptors that have registered for the event's class.


handleError

protected void handleError(java.lang.Throwable t)
Template method that is called internally when an error is trapped when invoking the call-back method on a given interceptor instance.



Copyright © 2010 Sapia OSS. All Rights Reserved.