|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jvnet.hk2.internal.ServiceHandleImpl<T>
T
- The type of service to createpublic class ServiceHandleImpl<T>
This handle does the underlying work of getting the service. Only at the time that the getService call is made is the service gotten from the context. Once a service has been gotten, it is not looked up again.
Method Summary | |
---|---|
void |
addSubHandle(ServiceHandleImpl<?> subHandle)
Add a sub handle to this for proper destruction |
void |
destroy()
Will destroy this object and all PerLookup instances created because of this service |
ActiveDescriptor<T> |
getActiveDescriptor()
Returns the ActiveDescriptor associated with this service handle |
T |
getService()
Gets the underlying service object |
boolean |
isActive()
This returns true if the underlying service has already been created |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public T getService()
ServiceHandle
getService
in interface ServiceHandle<T>
public ActiveDescriptor<T> getActiveDescriptor()
ServiceHandle
getActiveDescriptor
in interface ServiceHandle<T>
public boolean isActive()
ServiceHandle
isActive
in interface ServiceHandle<T>
public void destroy()
ServiceHandle
destroy
in interface ServiceHandle<T>
public void addSubHandle(ServiceHandleImpl<?> subHandle)
subHandle
- A handle to add for proper destructionpublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |