Package org.jboss.as.naming.service
Class BinderService
java.lang.Object
org.jboss.as.naming.service.BinderService
- All Implemented Interfaces:
Service,Service<ManagedReferenceFactory>,Value<ManagedReferenceFactory>
- Direct Known Subclasses:
ExternalContextBinderService
Service responsible for binding and unbinding an entry into a naming context. This service can be used as a dependency for
any service that needs to retrieve this entry from the context.
- Author:
- John E. Bailey, Eduardo Martins
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionBinderService(String name) BinderService(String name, Object source) Construct new instance.BinderService(String name, Object source, boolean shared) Construct new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidacquire()Get the injector for the item to be bound.getName()Get the naming store injector.getValue()Get the value from the injected context.booleanrelease()Releases the service, returnstrueif the service is removed as a result, or false otherwisevoidvoidstart(StartContext context) Bind the entry into the injected context.voidstop(StopContext context) Unbind the entry from the injected context.toString()
-
Constructor Details
-
BinderService
Construct new instance.- Parameters:
name- The JNDI name to use for binding. May be either an absolute or relative namesource-shared- indicates if the bind may be shared among multiple deployments, if true the service tracks references indicated through acquire(), and automatically stops once all deployments unreference it through release()
-
BinderService
Construct new instance.- Parameters:
name- The JNDI name to use for binding. May be either an absolute or relative name
-
BinderService
-
-
Method Details
-
getSource
-
setSource
-
acquire
public void acquire() -
release
public boolean release()Releases the service, returnstrueif the service is removed as a result, or false otherwise- Returns:
-
getServiceName
-
start
Bind the entry into the injected context.- Specified by:
startin interfaceService- Parameters:
context- The start context- Throws:
StartException- If the entity can not be bound
-
stop
Unbind the entry from the injected context. -
getValue
Get the value from the injected context.- Specified by:
getValuein interfaceValue<ManagedReferenceFactory>- Returns:
- The value of the named entry
- Throws:
IllegalStateException
-
getManagedObjectInjector
Get the injector for the item to be bound.- Returns:
- the injector
-
getNamingStoreInjector
Get the naming store injector.- Returns:
- the injector
-
toString
-
getName
-