|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ServiceBinder
Allows a module to bind service interfaces to service implementation classes in support of autobuilding services. A
ServiceBinder is passed to to a method with the following signature: public static void bind(ServiceBinder
binder). This is an adaptation of ideas from Guice.
| Method Summary | ||
|---|---|---|
|
bind(Class<T> implementationClass)
Defines a service in terms of an implementation class, without a service interface. |
|
|
bind(Class<T> serviceInterface,
Class<? extends T> serviceImplementation)
Binds the service interface to a service implementation class. |
|
|
bind(Class<T> serviceInterface,
ServiceBuilder<T> builder)
Alternative implementation that supports a callback to build the service, rather than instantiating a particular class. |
|
| Method Detail |
|---|
<T> ServiceBindingOptions bind(Class<T> implementationClass)
ServiceDef.getServiceInterface() will
return the implementation class. In this situation, the service will not be proxied; it will be instantiated
fully on first reference (ignoring its scope, if any) and will not be decorated.
T - implementationClass - class to instantiate as the service
<T> ServiceBindingOptions bind(Class<T> serviceInterface,
ServiceBuilder<T> builder)
serviceInterface - interface implemented by the servicebuilder - constructs the core service implementation
<T> ServiceBindingOptions bind(Class<T> serviceInterface,
Class<? extends T> serviceImplementation)
Scope annotation.
T - serviceInterface - service interface (used when locating services, and when building proxies)serviceImplementation - implementation class that implements the service interface
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||