Package io.joynr.context
Class JoynrMessageScope
- java.lang.Object
-
- io.joynr.context.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 asJoynrMessageScoped.
-
-
Constructor Summary
Constructors Constructor Description JoynrMessageScope()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate()Call this method to activate theJoynrMessageScopefor the current thread.voiddeactivate()Call this method in afinallyblock after having calledactivate()in order to de-activate the scope for the current thread.<T> com.google.inject.Provider<T>scope(com.google.inject.Key<T> key, com.google.inject.Provider<T> unscoped)
-
-
-
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:
scopein interfacecom.google.inject.Scope
-
activate
public void activate()
Call this method to activate theJoynrMessageScopefor 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 afinallyblock after having calledactivate()in order to de-activate the scope for the current thread.
-
-