public interface ScopeContainer
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.Object> |
getActiveInstances(ScopedComponent component)
Returns a snapshot of the component instances that are active and currently managed by the scope container.
|
java.lang.Object |
getInstance(ScopedComponent component)
Returns an instance associated with the current scope context, creating one if necessary
|
org.fabric3.api.model.type.component.Scope |
getScope()
Returns the Scope that this container supports.
|
void |
register(ScopedComponent component)
Registers a component with the scope.
|
void |
reinject()
Reinjects all live instances with updated wires
|
void |
releaseInstance(ScopedComponent component,
java.lang.Object instance)
Return am instance after use (for example, after invoking the instance).
|
void |
startContext(java.net.URI contributionUri)
Start a new, non-expiring context.
|
void |
stopContext(java.net.URI contributionUri)
Stop the context associated with the current work context.
|
void |
unregister(ScopedComponent component)
Unregisters a component with the scope.
|
org.fabric3.api.model.type.component.Scope getScope()
void register(ScopedComponent component)
component - the component to registervoid unregister(ScopedComponent component)
component - the component to unregistervoid startContext(java.net.URI contributionUri)
throws org.fabric3.api.host.Fabric3Exception
contributionUri - the URI of the contribution to start the context fororg.fabric3.api.host.Fabric3Exception - if an exception starting the context was encounteredvoid stopContext(java.net.URI contributionUri)
throws org.fabric3.api.host.Fabric3Exception
contributionUri - he URI of the contribution to stop the context fororg.fabric3.api.host.Fabric3Exception - if there is an error stopping the contextjava.lang.Object getInstance(ScopedComponent component) throws org.fabric3.api.host.Fabric3Exception
component - the componentorg.fabric3.api.host.Fabric3Exception - if there was a problem instantiating the target instancevoid releaseInstance(ScopedComponent component, java.lang.Object instance) throws org.fabric3.api.host.Fabric3Exception
component - the componentinstance - the instanceorg.fabric3.api.host.Fabric3Exception - if there was a problem returning the target instancejava.util.List<java.lang.Object> getActiveInstances(ScopedComponent component)
component - the componentvoid reinject()
throws org.fabric3.api.host.Fabric3Exception
org.fabric3.api.host.Fabric3Exception - if an error occurs during re-injection