Package org.osgi.service.cdi.reference
Interface BindServiceReference<S>
- Type Parameters:
- S- the service argument type.
@ProviderType
public interface BindServiceReference<S>
A bean provided by CCR for binding actions to life cycle events of matching
 services.
- See Also:
- 
Method SummaryModifier and TypeMethodDescriptionadding(BiConsumer<ServiceReference<S>, S> action) Subscribe an action to the adding service event.adding(Consumer<ServiceReference<S>> action) Subscribe an action to the adding service event.voidbind()The bind terminal operation is required to instruct CCR that all the bind actions have been specified, otherwise bind actions will never be called by CCR.modified(BiConsumer<ServiceReference<S>, S> action) Subscribe an action to the modified service event.modified(Consumer<ServiceReference<S>> action) Subscribe an action to the modified service event.removed(BiConsumer<ServiceReference<S>, S> action) Subscribe an action to the removed service event.removed(Consumer<ServiceReference<S>> action) Subscribe an action to the removed service event.
- 
Method Details- 
addingSubscribe an action to the adding service event.Only the last adding action is used. - Parameters:
- action- the action, whose argument is the service reference, to subscribe to the adding service event
- Returns:
- self
- Throws:
- IllegalStateException- when called after- bind()
 
- 
addingSubscribe an action to the adding service event.Only the last adding action is used. - Parameters:
- action- the action, whose arguments are the service reference and the service object, to subscribe to the adding service event
- Returns:
- self
- Throws:
- IllegalStateException- when called after- bind()
 
- 
modifiedSubscribe an action to the modified service event.Only the last modified action is used. - Parameters:
- action- the action, whose argument is the service reference, to subscribe to the modified service event
- Returns:
- self
- Throws:
- IllegalStateException- when called after- bind()
 
- 
modifiedSubscribe an action to the modified service event.Only the last modified action is used. - Parameters:
- action- the action, whose arguments are the service reference and the service object, to subscribe to the modified service event
- Returns:
- self
- Throws:
- IllegalStateException- when called after- bind()
 
- 
removedSubscribe an action to the removed service event.Only the last removed action is used. - Parameters:
- action- the action, whose argument is the service reference, to subscribe to the removed service event
- Returns:
- self
- Throws:
- IllegalStateException- when called after- bind()
 
- 
removedSubscribe an action to the removed service event.Only the last removed action is used. - Parameters:
- action- the action, whose arguments are the service reference and the service object, to subscribe to the removed service event
- Returns:
- self
- Throws:
- IllegalStateException- when called after- bind()
 
- 
bindvoid bind()The bind terminal operation is required to instruct CCR that all the bind actions have been specified, otherwise bind actions will never be called by CCR.Calling bind()again has no effect.
 
-