Package org.onehippo.cms7.services
Class ServiceHolder<T>
java.lang.Object
org.onehippo.cms7.services.ServiceHolder<T>
- Direct Known Subclasses:
ProxiedServiceHolder
The ServiceHolder holds a service object with its context classloader at the time of creating the holder.
Service objects that are obtained in this way, e.g. through a ServiceTracker
on a
WhiteboardServiceRegistry
must be invoked with the context classloader set to the getClassLoader()
.
-
Method Summary
-
Method Details
-
getClassLoader
- Returns:
- the classloader from
Thread.currentThread().getContextClassLoader()
at the creation of this service holder.
-
getServiceObject
- Returns:
- the service object this holder was created for.
-