org.jvnet.hk2.internal
Class ServiceHandleImpl<T>

java.lang.Object
  extended by org.jvnet.hk2.internal.ServiceHandleImpl<T>
Type Parameters:
T - The type of service to create
All Implemented Interfaces:
ServiceHandle<T>

public class ServiceHandleImpl<T>
extends java.lang.Object
implements ServiceHandle<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.

Author:
jwells

Method Summary
 void addSubHandle(ServiceHandleImpl<?> subHandle)
          Add a sub handle to this for proper destruction
 void destroy()
           
 ActiveDescriptor<T> getActiveDescriptor()
           
 T getService()
           
 boolean isActive()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getService

public T getService()
Specified by:
getService in interface ServiceHandle<T>

getActiveDescriptor

public ActiveDescriptor<T> getActiveDescriptor()
Specified by:
getActiveDescriptor in interface ServiceHandle<T>

isActive

public boolean isActive()
Specified by:
isActive in interface ServiceHandle<T>

destroy

public void destroy()
Specified by:
destroy in interface ServiceHandle<T>

addSubHandle

public void addSubHandle(ServiceHandleImpl<?> subHandle)
Add a sub handle to this for proper destruction

Parameters:
subHandle - A handle to add for proper destruction

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2012 Oracle Corporation. All Rights Reserved.