com.googlecode.xremoting.core.invoked
Class DefaultInvoker

java.lang.Object
  extended by com.googlecode.xremoting.core.invoked.DefaultInvoker
All Implemented Interfaces:
Invoker

public class DefaultInvoker
extends Object
implements Invoker

Default Invoker implementation. Only allows to invoke methods which are defined by interfaces specified in the InvocationRestriction.

Author:
Roman Puchkovskiy

Constructor Summary
DefaultInvoker()
           
 
Method Summary
protected  void checkMethod(Method method, InvocationRestriction restriction)
           
 Object invoke(Object target, Invocation invocation, InvocationRestriction restriction)
          Invokes an invocation on a target object with restriction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultInvoker

public DefaultInvoker()
Method Detail

invoke

public Object invoke(Object target,
                     Invocation invocation,
                     InvocationRestriction restriction)
              throws InvokedSideInvocationException,
                     Throwable
Description copied from interface: Invoker
Invokes an invocation on a target object with restriction.

Specified by:
invoke in interface Invoker
Parameters:
target - object on which to call method
invocation - what to invoke, and parameters
restriction - attributes which define how invocation will be restricted
Returns:
invocation result
Throws:
InvokedSideInvocationException - thrown if something is wrong with invocation itself, like NoSuchMethodException or alike. Also, thrown if invocation is not allowed due to restriction.
Throwable - anything thrown by the target

checkMethod

protected void checkMethod(Method method,
                           InvocationRestriction restriction)
                    throws InvokedSideInvocationException,
                           SecurityException
Throws:
InvokedSideInvocationException
SecurityException


Copyright © 2010. All Rights Reserved.