net.sf.shineframework.server.facades.impl
Class NullFacadeInvocationHandler

java.lang.Object
  extended by net.sf.shineframework.server.facades.impl.NullFacadeInvocationHandler
All Implemented Interfaces:
java.lang.reflect.InvocationHandler

public class NullFacadeInvocationHandler
extends java.lang.Object
implements java.lang.reflect.InvocationHandler


Constructor Summary
NullFacadeInvocationHandler(java.lang.String facadeInterface)
           
 
Method Summary
 java.util.List<java.lang.Object> getDelegates()
           
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
          The virtual method that implements all non-concrete methods.
 void setDelegates(java.util.List<java.lang.Object> delegates)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullFacadeInvocationHandler

public NullFacadeInvocationHandler(java.lang.String facadeInterface)
Method Detail

getDelegates

public java.util.List<java.lang.Object> getDelegates()

invoke

public java.lang.Object invoke(java.lang.Object proxy,
                               java.lang.reflect.Method method,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
The virtual method that implements all non-concrete methods. If the requested method exist in the parent facade implmementation the this method is used. Otherwise the method is searched in all assigned delegates in the order in which they appear in the array list (which means the order in the configuration file). If the method is found it is invoked on the delegate. Otherwise a NoSuchMethodException is thrown.

Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Throws:
java.lang.NoSuchMethodException - when the method cannot be found on any delegate
java.lang.Throwable

setDelegates

public void setDelegates(java.util.List<java.lang.Object> delegates)


Copyright © 2007 sourceforge.net. All Rights Reserved.