public interface ServiceInstance
| Modifier and Type | Method and Description |
|---|---|
default void |
destroy()
Destroy the service instance.
|
<T> T |
getContext()
Get the context object associated with the service instance.
|
default Set<Class<? extends Annotation>> |
getCustomQualifiers()
Get all the custom qualifier annotations classes supported by the service locator.
|
default Set<Class<? extends Annotation>> |
getNameQualifers()
Get all the name qualifier annotation classes supported by the service locator.
|
<T> T |
getService(Type type,
Annotation... qualifiers)
Get a service with the given qualifiers.
|
<T> T |
getService(Type type,
String name)
Get a service with the given name.
|
default void |
inject(Object instance)
Injected collaborators into the given object instance.
|
default Boolean |
isRunning()
Determine if the service instance is running.
|
<T> T getContext()
T - the type of the context object<T> T getService(Type type, String name)
T - the service typetype - the service typename - the service name<T> T getService(Type type, Annotation... qualifiers)
T - the service typetype - the service typequalifiers - the service qualifiersdefault Boolean isRunning()
default void destroy()
default void inject(Object instance)
instance - the instance that will be injected.default Set<Class<? extends Annotation>> getNameQualifers()
default Set<Class<? extends Annotation>> getCustomQualifiers()
Copyright © 2016–2018 Testify Project. All rights reserved.