|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.tapestry5.ioc.internal.ServiceBinderImpl
public class ServiceBinderImpl
| Constructor Summary | |
|---|---|
ServiceBinderImpl(ServiceDefAccumulator accumulator,
Method bindMethod,
PlasticProxyFactory proxyFactory,
Set<Class> defaultMarkers,
boolean moduleDefaultPreventDecoration)
|
|
| Method Summary | ||
|---|---|---|
|
bind(Class<T> serviceClass)
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. |
|
ServiceBindingOptions |
eagerLoad()
Turns eager loading on for this service. |
|
void |
finish()
|
|
protected void |
flush()
|
|
ServiceBindingOptions |
preventDecoration()
Disallows service decoration for this service. |
|
ServiceBindingOptions |
preventReloading()
Identifies a service for which live class reloading is not desired. |
|
ServiceBindingOptions |
scope(String scope)
Sets the scope of the service, overriding the Scope annotation on the service implementation class. |
|
ServiceBindingOptions |
withId(String id)
Allows a specific service id for the service to be provided, rather than the default (from the service interface). |
|
|
withMarker(Class<T>... marker)
Defines the marker interface(s) for the service, used to connect injections by type at the point of injection with a particular service implementation, based on the intersection of type and marker interface. |
|
ServiceBindingOptions |
withSimpleId()
Uses the the simple (unqualified) class name of the implementation class as the id of the service. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServiceBinderImpl(ServiceDefAccumulator accumulator,
Method bindMethod,
PlasticProxyFactory proxyFactory,
Set<Class> defaultMarkers,
boolean moduleDefaultPreventDecoration)
| Method Detail |
|---|
public void finish()
protected void flush()
public <T> ServiceBindingOptions bind(Class<T> serviceClass)
ServiceBinderServiceDef.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.
bind in interface ServiceBinderserviceClass - class to instantiate as the service
public <T> ServiceBindingOptions bind(Class<T> serviceInterface,
ServiceBuilder<T> builder)
ServiceBinder
bind in interface ServiceBinderserviceInterface - interface implemented by the servicebuilder - constructs the core service implementation
public <T> ServiceBindingOptions bind(Class<T> serviceInterface,
Class<? extends T> serviceImplementation)
ServiceBinderScope annotation.
bind in interface ServiceBinderserviceInterface - service interface (used when locating services, and when building proxies)serviceImplementation - implementation class that implements the service interface
public ServiceBindingOptions eagerLoad()
ServiceBindingOptionsEagerLoad annotation on
the service implementation class.
eagerLoad in interface ServiceBindingOptionspublic ServiceBindingOptions preventDecoration()
ServiceBindingOptions
preventDecoration in interface ServiceBindingOptionspublic ServiceBindingOptions preventReloading()
ServiceBindingOptions
preventReloading in interface ServiceBindingOptionspublic ServiceBindingOptions withId(String id)
ServiceBindingOptions
withId in interface ServiceBindingOptionspublic ServiceBindingOptions withSimpleId()
ServiceBindingOptions
withSimpleId in interface ServiceBindingOptionspublic ServiceBindingOptions scope(String scope)
ServiceBindingOptionsScope annotation on the service implementation class.
scope in interface ServiceBindingOptionsScopeConstantspublic <T extends Annotation> ServiceBindingOptions withMarker(Class<T>... marker)
ServiceBindingOptions
withMarker in interface ServiceBindingOptionsmarker - one or more markers to add
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||