![]() |
Saros
Distributed Collaborative Editing and Distributed Party Programming
|
Public Member Functions | |
SarosContext (List< ISarosContextFactory > factories, DotGraphMonitor dotGraphMonitor) | |
synchronized void | reinject (Object toInjectInto) |
synchronized void | initComponent (Object toInjectInto) |
List< Object > | getComponents () |
void | addComponent (Object o, Object o1, Parameter...parameters) |
void | removeComponent (Object o) |
boolean | removeChildContainer (PicoContainer picoContainer) |
void | dispose () |
MutablePicoContainer | createSimpleChildContainer () |
Package Functions | |
public< T > T | getComponent (Class< T > tClass) |
public< T > List< T > | getComponents (Class< T > tClass) |
Encapsulates a org.picocontainer.PicoContainer and its Saros-specific initialization. Basically it's used to get or reinject components in the context:
de.fu_berlin.inf.dpp.SarosContext#getComponent(Class), de.fu_berlin.inf.dpp.SarosContext#reinject(Object)
These methods change the context respectively the PicoContainer!
If you want to initialize a component with the components of the context without changing the context you can use the method de.fu_berlin.inf.dpp.SarosContext#initComponent(Object).
de.fu_berlin.inf.dpp.SarosContext.SarosContext | ( | List< ISarosContextFactory > | factories, |
DotGraphMonitor | dotGraphMonitor | ||
) |
void de.fu_berlin.inf.dpp.SarosContext.addComponent | ( | Object | o, |
Object | o1, | ||
Parameter... | parameters | ||
) |
MutablePicoContainer de.fu_berlin.inf.dpp.SarosContext.createSimpleChildContainer | ( | ) |
This should only be used by SarosSession code. Make sure to release the child container to prevent a memory leak
Implements de.fu_berlin.inf.dpp.ISarosContext.
void de.fu_berlin.inf.dpp.SarosContext.dispose | ( | ) |
public<T> T de.fu_berlin.inf.dpp.SarosContext.getComponent | ( | Class< T > | componentType | ) | [package] |
Retrieve a component keyed by the component type.
componentType | the type of the component |
null
if the object does not exist. Implements de.fu_berlin.inf.dpp.ISarosContext.
public<T> List<T> de.fu_berlin.inf.dpp.SarosContext.getComponents | ( | Class< T > | tClass | ) | [package] |
List<Object> de.fu_berlin.inf.dpp.SarosContext.getComponents | ( | ) |
synchronized void de.fu_berlin.inf.dpp.SarosContext.initComponent | ( | Object | toInjectInto | ) |
Injects dependencies into the annotated fields of the given object. This method should be used for objects that were created by Eclipse, which have a different life cycle than the Saros plug-in.
Implements de.fu_berlin.inf.dpp.ISarosContext.
synchronized void de.fu_berlin.inf.dpp.SarosContext.reinject | ( | Object | toInjectInto | ) |
Adds the object to Saros' container, and injects dependencies into the annotated fields of the given object. It should only be used for objects that were created by Eclipse, which have the same life cycle as the Saros plug-in, e.g. the popup menu actions.
boolean de.fu_berlin.inf.dpp.SarosContext.removeChildContainer | ( | PicoContainer | picoContainer | ) |
Remove the given child from this contexts container.
picoContainer |
Implements de.fu_berlin.inf.dpp.ISarosContext.
void de.fu_berlin.inf.dpp.SarosContext.removeComponent | ( | Object | o | ) |