public interface ServiceBinder
public static void bind(ServiceBinder
binder)
. This is an adaptation of ideas from Guice.Modifier and Type | Method and Description |
---|---|
<T> ServiceBindingOptions |
bind(Class<T> implementationClass)
Defines a service in terms of an implementation class, without a service interface.
|
<T> ServiceBindingOptions |
bind(Class<T> serviceInterface,
Class<? extends T> serviceImplementation)
Binds the service interface to a service implementation class.
|
<T> ServiceBindingOptions |
bind(Class<T> serviceInterface,
ServiceBuilder<T> builder)
Alternative implementation that supports a callback to build the service, rather than instantiating a particular
class.
|
<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${project.version} - Copyright © 2003-2015 The Apache Software Foundation.