|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.jersey.internal.inject.AbstractBinder
public abstract class AbstractBinder
Skeleton implementation of injection binder with convenience methods for binding definitions.
| Constructor Summary | |
|---|---|
AbstractBinder()
|
|
| Method Summary | ||
|---|---|---|
|
addActiveDescriptor(ActiveDescriptor<T> activeDescriptor)
|
|
|
addActiveDescriptor(Class<T> rawClass)
|
|
void |
addUnbindFilter(Filter unbindFilter)
|
|
|
bind(Class<T> serviceType)
Start building a new class-based service binding. |
|
|
bind(Descriptor descriptor)
|
|
void |
bind(DynamicConfiguration configuration)
|
|
FactoryDescriptors |
bind(FactoryDescriptors factoryDescriptors)
|
|
|
bind(T service)
Start building a new instance-based service binding. |
|
|
bindAsContract(Class<T> serviceType)
Start building a new class-based service binding. |
|
|
bindAsContract(TypeLiteral<T> serviceType)
Start building a new generic type-based service binding. |
|
|
bindFactory(Class<? extends Factory<T>> factoryType)
Start building a new factory class-based service binding. |
|
|
bindFactory(Class<? extends Factory<T>> factoryType,
Class<? extends Annotation> factoryScope)
Start building a new factory class-based service binding. |
|
|
bindFactory(Factory<T> factory)
Start building a new factory instance-based service binding. |
|
void |
commit()
|
|
protected abstract void |
configure()
Implement to provide binding definitions using the exposed binding methods. |
|
void |
install(Binder... binders)
Adds all binding definitions from the binders to the binding configuration. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractBinder()
| Method Detail |
|---|
public <T> ServiceBindingBuilder<T> bind(Class<T> serviceType)
T - service type.serviceType - service class.
public <T> ServiceBindingBuilder<T> bindAsContract(Class<T> serviceType)
T - service type.serviceType - service class.
public <T> ServiceBindingBuilder<T> bindAsContract(TypeLiteral<T> serviceType)
T - service type.serviceType - generic service type information.
public <T> ScopedBindingBuilder<T> bind(T service)
singleton-scoped.
Does NOT bind the service type itself as a contract type.
T - service type.service - service instance.
public <T> ServiceBindingBuilder<T> bindFactory(Class<? extends Factory<T>> factoryType,
Class<? extends Annotation> factoryScope)
T - service type.factoryType - service factory class.factoryScope - factory scope.
public <T> ServiceBindingBuilder<T> bindFactory(Class<? extends Factory<T>> factoryType)
per-lookup scope.
T - service type.factoryType - service factory class.
public <T> ServiceBindingBuilder<T> bindFactory(Factory<T> factory)
T - service type.factory - service instance.
public void bind(DynamicConfiguration configuration)
bind in interface Binderprotected abstract void configure()
public <T> ActiveDescriptor<T> bind(Descriptor descriptor)
This method can be called only in the execution context of the configure()
method.
bind in interface DynamicConfigurationpublic FactoryDescriptors bind(FactoryDescriptors factoryDescriptors)
This method can be called only in the execution context of the configure()
method.
bind in interface DynamicConfiguration
public <T> ActiveDescriptor<T> addActiveDescriptor(ActiveDescriptor<T> activeDescriptor)
throws IllegalArgumentException
This method can be called only in the execution context of the configure()
method.
addActiveDescriptor in interface DynamicConfigurationIllegalArgumentException
public <T> ActiveDescriptor<T> addActiveDescriptor(Class<T> rawClass)
throws MultiException,
IllegalArgumentException
This method can be called only in the execution context of the configure()
method.
addActiveDescriptor in interface DynamicConfigurationMultiException
IllegalArgumentException
public void addUnbindFilter(Filter unbindFilter)
throws IllegalArgumentException
This method can be called only in the execution context of the configure()
method.
addUnbindFilter in interface DynamicConfigurationIllegalArgumentException
public void commit()
throws MultiException
This method can be called only in the execution context of the configure()
method.
commit in interface DynamicConfigurationMultiExceptionpublic final void install(Binder... binders)
binders - binders whose binding definitions should be configured.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||