|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@Deprecated public interface BinderFactory
Factory for adding services instances to a Services
. Services
definition can vary per service, some services implement well defined
interfaces usually annotated with Contract
which are called contracts. Some services do not implement such
interfaces and are registered under their implementation type.
NamedBinder
.
Method Summary | ||
---|---|---|
NamedBinder<Object> |
bind()
Deprecated. Binds a service which does not implement a contract or interface that can be used to look it up. |
|
|
bind(Class<T> contract,
Class<?>... contracts)
Deprecated. Starts a binding process of a service using at least one interface or abstract class Class reference. |
|
Binder<Object> |
bind(String... contractNames)
Deprecated. Starts the binding process of a service using String
interfaces names that can be used to lookup the service. |
|
Binder<Object> |
bind(String contractName)
Deprecated. Binds a service using a String interface name. |
|
|
bind(TypeLiteral<T> typeLiteral)
Deprecated. Binds a parameterized type by forcing users to create a subclass of TypeLiteral which will allow HK2 to retrieve the parameterized
type at runtime. |
|
BinderFactory |
inParent()
Deprecated. Return the parent binder factory instance which can be used to bind services for wider visibility outside of this module definition. |
Method Detail |
---|
BinderFactory inParent()
Binder<Object> bind(String contractName)
String
interface name.
contractName
- the interface fqcn.
Binder
instance that can be used to further
qualify the binding request.Binder<Object> bind(String... contractNames)
String
interfaces names that can be used to lookup the service.
contractNames
- the interfaces fully qualified class names.
Binder
instance that can be used to further
qualify the binding request.<T> Binder<T> bind(Class<T> contract, Class<?>... contracts)
Class
reference.
Supplemental interfaces can be used to register the service
under different contracts. Each contract can be used to look
up the service.
The service must implements all the contracts passed in
this method.
T
- the main contract typecontract
- the main contract Class
referencecontracts
- supplemental contracts references
Binder
instance for the main contract type type to further
qualify the binding request.<T> Binder<T> bind(TypeLiteral<T> typeLiteral)
TypeLiteral
which will allow HK2 to retrieve the parameterized
type at runtime.
T
- the parameterized type to use as a contract definition. This
will allow users to inject instances of the parameterized type. HK2
cannot bind a generic type like SettypeLiteral
- a TypeLiteral
subclass instance
Binder
instance for that parameterized type to further
qualify the binding request.NamedBinder<Object> bind()
NamedBinder
to register the service.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |