Package org.onehippo.cms7.services
Class ProxiedServiceHolder<T>
- java.lang.Object
-
- org.onehippo.cms7.services.ServiceHolder<T>
-
- org.onehippo.cms7.services.ProxiedServiceHolder<T>
-
public class ProxiedServiceHolder<T> extends ServiceHolder<T>
The ProxiedServiceHolder holds a service object and a proxy instance of its service interface(s).
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stream<Class<?>>
getExtraInterfaces()
Class<T>
getServiceInterface()
T
getServiceProxy()
-
Methods inherited from class org.onehippo.cms7.services.ServiceHolder
getClassLoader, getServiceObject
-
-
-
-
Method Detail
-
getServiceInterface
public Class<T> getServiceInterface()
- Returns:
- the interface to be implemented by the proxy returned by
getServiceProxy()
-
getExtraInterfaces
public Stream<Class<?>> getExtraInterfaces()
- Returns:
- the extra interfaces to be implemented by the proxy returned by
getServiceProxy()
, if specified during the creation of the service holder, otherwise an empty stream will be returned.
-
getServiceProxy
public T getServiceProxy()
- Returns:
- The proxy implementing {
getServiceInterface()
} andgetExtraInterfaces()
if defined, Methods invoked on the proxy will be executed with theThread.currentThread().getContextClassLoader
when this service holder was created
-
-