T
- The type of the service that can be returnedpublic interface ServiceHandle<T> extends Closeable
Modifier and Type | Method and Description |
---|---|
default void |
close()
Will destroy this object and all PerLookup instances created
because of this service
|
default void |
destroy()
Deprecated.
since 2.6. Use
close() instead |
ActiveDescriptor<T> |
getActiveDescriptor()
Returns the ActiveDescriptor associated with this service handle
|
T |
getService()
Gets the underlying service object
|
Object |
getServiceData()
Service data can be set on a service handle.
|
List<ServiceHandle<?>> |
getSubHandles()
Returns a list of subordinate subhandles
to this root handle
|
boolean |
isActive()
This returns true if the underlying service has already been
created
|
void |
setServiceData(Object serviceData)
Service data can be set on a service handle.
|
T getService()
MultiException
- if there was an error creating the serviceIllegalStateException
- if the handle was previously destroyedActiveDescriptor<T> getActiveDescriptor()
boolean isActive()
@Deprecated default void destroy()
close()
insteaddefault void close()
close
in interface AutoCloseable
close
in interface Closeable
void setServiceData(Object serviceData)
serviceData
- Sets the serviceData for the handle
(may be null)Object getServiceData()
List<ServiceHandle<?>> getSubHandles()
Copyright © 2009–2019 Oracle Corporation. All rights reserved.