public interface ISharedStateContextProvider
ISharedStateContextProvider
is responsible to create shared state
context, to dispose them and to provide active instances of them.
The provider is counting references to the shared state context objects
returned. A call to getContext(String, Map)
will increase the
counter of references. A call to unget(ISharedStateContext)
will decrease the counter. If the counter for a ISharedStateContext
decreased to 0, it will become disposed.
Modifier and Type | Method and Description |
---|---|
ISharedStateContext |
getContext(String id,
Map<String,Object> properties)
Returns the
ISharedStateContext for the given id. |
void |
unget(ISharedStateContext context)
If an
ISharedStateContext is not used anymore, that method must
be called. |
ISharedStateContext getContext(String id, Map<String,Object> properties)
ISharedStateContext
for the given id. If no shared
state context is available, a new instance will be created and registered
as an OSGi service.
The internal usage counter will be increased. Do not miss to
unget(ISharedStateContext)
the context if it is not needed
anymore.
id
- the idproperties
- - will be added to the OSGi servicevoid unget(ISharedStateContext context)
ISharedStateContext
is not used anymore, that method must
be called.
The internal usage counter will be decreased. If usage counter reaches zero, the context will be disposed.
context
- the contextCopyright © 2013-2016 Loetz GmbH&Co.KG - Heidelberg - Germany, Eclipse OSBP Project, OS.bee