Interface BindService<S>

  • Type Parameters:
    S - the service argument type.

    @ProviderType
    public interface BindService<S>
    A bean provided by CCR for binding actions to life cycle events of matching services.
    Author:
    $Id: 5333f4e6310307a1ed0931a094a13b26918247c2 $
    See Also:
    Reference
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      BindService<S> adding​(java.util.function.BiConsumer<S,​java.util.Map<java.lang.String,​java.lang.Object>> action)
      Subscribe an action to the adding service event.
      BindService<S> adding​(java.util.function.Consumer<S> action)
      Subscribe an action to the adding service event.
      void 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.
      BindService<S> modified​(java.util.function.BiConsumer<S,​java.util.Map<java.lang.String,​java.lang.Object>> action)
      Subscribe an action to the modified service event.
      BindService<S> modified​(java.util.function.Consumer<S> action)
      Subscribe an action to the modified service event.
      BindService<S> removed​(java.util.function.BiConsumer<S,​java.util.Map<java.lang.String,​java.lang.Object>> action)
      Subscribe an action to the removed service event.
      BindService<S> removed​(java.util.function.Consumer<S> action)
      Subscribe an action to the removed service event.
    • Method Detail

      • adding

        BindService<S> adding​(java.util.function.Consumer<S> action)
        Subscribe an action to the adding service event.

        Only the last adding action is used.

        Parameters:
        action - the action, whose argument is the service instance, to subscribe to the adding service event
        Returns:
        self
        Throws:
        java.lang.IllegalStateException - when called after bind()
      • adding

        BindService<S> adding​(java.util.function.BiConsumer<S,​java.util.Map<java.lang.String,​java.lang.Object>> action)
        Subscribe an action to the adding service event.

        Only the last adding action is used.

        Parameters:
        action - the action, whose arguments are the service instance and the Map<String, Object> of service properties, to subscribe to the adding service event
        Returns:
        self
        Throws:
        java.lang.IllegalStateException - when called after bind()
      • modified

        BindService<S> modified​(java.util.function.Consumer<S> action)
        Subscribe an action to the modified service event.

        Only the last modified action is used.

        Parameters:
        action - the action, whose argument is the service instance, to subscribe to the modified service event
        Returns:
        self
        Throws:
        java.lang.IllegalStateException - when called after bind()
      • modified

        BindService<S> modified​(java.util.function.BiConsumer<S,​java.util.Map<java.lang.String,​java.lang.Object>> action)
        Subscribe an action to the modified service event.

        Only the last modified action is used.

        Parameters:
        action - the action, whose arguments are the service instance and the Map<String, Object> of service properties, to subscribe to the modified service event
        Returns:
        self
        Throws:
        java.lang.IllegalStateException - when called after bind()
      • removed

        BindService<S> removed​(java.util.function.Consumer<S> action)
        Subscribe an action to the removed service event.

        Only the last removed action is used.

        Parameters:
        action - the action, whose argument is the service instance, to subscribe to the removed service event
        Returns:
        self
        Throws:
        java.lang.IllegalStateException - when called after bind()
      • removed

        BindService<S> removed​(java.util.function.BiConsumer<S,​java.util.Map<java.lang.String,​java.lang.Object>> action)
        Subscribe an action to the removed service event.

        Only the last removed action is used.

        Parameters:
        action - the action, whose arguments are the service instance and the Map<String, Object> of service properties, to subscribe to the removed service event
        Returns:
        self
        Throws:
        java.lang.IllegalStateException - when called after bind()
      • bind

        void 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.