Nuxeo Enterprise Platform 5.4

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:
java.lang.reflect.InvocationHandler, Adaptable, ServiceProxy<T>

public class AdaptableServiceInvoker<T extends AdaptableService>
extends java.lang.Object
implements ServiceProxy<T>, java.lang.reflect.InvocationHandler, Adaptable

Author:
Bogdan Stefanescu

Constructor Summary
AdaptableServiceInvoker(T remote)
           
 
Method Summary
<A> A
getAdapter(java.lang.Class<A> adapter)
          Returns an object which is an instance of the given class associated with this object.
 T getRemote()
           
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.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(java.lang.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 java.lang.Object invoke(java.lang.Object proxy,
                               java.lang.reflect.Method method,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Throws:
java.lang.Throwable

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.