Class JoynrMessageScope

  • All Implemented Interfaces:
    com.google.inject.Scope

    public class JoynrMessageScope
    extends Object
    implements com.google.inject.Scope
    Implementation of the joynr message scope, for instances which are to be valid during the processing of joynr messages and are marked as JoynrMessageScoped.
    • Constructor Detail

      • JoynrMessageScope

        public JoynrMessageScope()
    • Method Detail

      • scope

        public <T> com.google.inject.Provider<T> scope​(com.google.inject.Key<T> key,
                                                       com.google.inject.Provider<T> unscoped)
        Specified by:
        scope in interface com.google.inject.Scope
      • activate

        public void activate()
        Call this method to activate the JoynrMessageScope for the current thread. It is not valid to call this method more than once.
        Throws:
        IllegalStateException - if you have already activated this scope for the current thread.
      • deactivate

        public void deactivate()
        Call this method in a finally block after having called activate() in order to de-activate the scope for the current thread.