Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.runtime.service.proxy
Class AdaptableServiceInvoker<T extends AdaptableService>

java.lang.Object
  extended by org.nuxeo.runtime.service.proxy.AdaptableServiceInvoker<T>
All Implemented Interfaces:
InvocationHandler, Adaptable, ServiceProxy<T>

public class AdaptableServiceInvoker<T extends AdaptableService>
extends Object
implements ServiceProxy<T>, InvocationHandler, Adaptable

Author:
Bogdan Stefanescu

Constructor Summary
AdaptableServiceInvoker(T remote)
           
 
Method Summary
<A> A
getAdapter(Class<A> adapter)
          Returns an object which is an instance of the given class associated with this object.
 T getRemote()
           
 Object invoke(Object proxy, Method method, Object[] args)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdaptableServiceInvoker

public AdaptableServiceInvoker(T remote)
Method Detail

getRemote

public T getRemote()
Specified by:
getRemote in interface ServiceProxy<T extends AdaptableService>

getAdapter

public <A> A getAdapter(Class<A> adapter)
Description copied from interface: Adaptable
Returns an object which is an instance of the given class associated with this object. Returns null if no such object can be found.

Specified by:
getAdapter in interface Adaptable
Parameters:
adapter - the adapter class to look up
Returns:
a object castable to the given class, or null if this object does not have an adapter for the given class

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Specified by:
invoke in interface InvocationHandler
Throws:
Throwable

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.