Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Project Rio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jini.rio.bean
Class BeanDelegator

    java.lang.Object
      org.jini.rio.bean.BeanDelegator

All Implemented Interfaces:
  Serializable, InvocationHandler

    public class BeanDelegator

extends Object
implements InvocationHandler, Serializable

An `InvocationHandler` that delegates method calls betweeen the `BeanAdapter` and the bean

See Also:
  Serialized Form

Method Summary
`static Object` | `getInstance(Object service, Object bean, Class[] interfaces)` Get an instance of the BeanDelegator using the ClassLoader of the `bean` parameter to define the proxy class
`static Object` | `getInstance(Object service, Object bean, Class[] interfaces, ClassLoader loader)` Get an instance of the BeanDelegator
`Object` | `invoke(Object proxy, Method method, Object[] args)` Perform the invocation, directing the method request to the appropriate implementation

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getInstance

    public static Object getInstance(Object service,
                                     Object bean,
                                     Class[] interfaces)

  Get an instance of the BeanDelegator using the ClassLoader of the `bean` parameter to define the proxy class

  Parameters:
    `service` - The service, must not be `null`
    `bean` - The bean, must not be `null`
    `interfaces` - The interfaces to expose, must not be `null`
  Returns:
    An object suitable for use as a proxy. A new proxy will be created each time
  Throws:
    `NullPointerException` - if any of the parameters is `null`
    `IllegalArgumentException` - If the interfaces parameter has a zero length

### getInstance

    public static Object getInstance(Object service,
                                     Object bean,
                                     Class[] interfaces,
                                     ClassLoader loader)

  Get an instance of the BeanDelegator

  Parameters:
    `service` - The service, must not be `null`
    `bean` - The bean, must not be `null`
    `interfaces` - The interfaces to expose, must not be `null`
    `loader` - The class loader to define the proxy class
  Returns:
    An object suitable for use as a proxy. A new proxy will be created each time
  Throws:
    `NullPointerException` - if any of the parameters is `null`
    `IllegalArgumentException` - If the interfaces parameter has a zero length

### invoke

    public Object invoke(Object proxy,
                         Method method,
                         Object[] args)
                  throws Throwable

  Perform the invocation, directing the method request to the appropriate implementation

  Specified by:
    `invoke` in interface `InvocationHandler`
  Throws:
    `Throwable`
  See Also:
    `InvocationHandler.invoke(Object, java.lang.reflect.Method, Object[])`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Project Rio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © Project Rio.