|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.avalon.excalibur.component.servlet.AbstractReferenceProxy
org.apache.avalon.excalibur.component.servlet.ComponentManagerReferenceProxy
final class ComponentManagerReferenceProxy
Reference Proxy to a ComponentManager
| Field Summary | |
|---|---|
private org.apache.avalon.framework.component.ComponentManager |
m_componentManager
Deprecated. |
| Constructor Summary | |
|---|---|
ComponentManagerReferenceProxy(org.apache.avalon.framework.component.ComponentManager componentManager,
AbstractReferenceProxyLatch latch,
java.lang.String name)
Deprecated. Create a new proxy. |
|
| Method Summary | |
|---|---|
boolean |
hasComponent(java.lang.String role)
Deprecated. Check to see if a Component exists for a role. |
org.apache.avalon.framework.component.Component |
lookup(java.lang.String role)
Deprecated. Get the Component associated with the given role. |
void |
release(org.apache.avalon.framework.component.Component component)
Deprecated. Return the Component when you are finished with it. |
| Methods inherited from class org.apache.avalon.excalibur.component.servlet.AbstractReferenceProxy |
|---|
finalize, getName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private org.apache.avalon.framework.component.ComponentManager m_componentManager
| Constructor Detail |
|---|
ComponentManagerReferenceProxy(org.apache.avalon.framework.component.ComponentManager componentManager,
AbstractReferenceProxyLatch latch,
java.lang.String name)
componentManager - ComponentManager being proxied.latch - Latch wich will be notified when this proxy is finalized.name - Name of the proxy.| Method Detail |
|---|
public org.apache.avalon.framework.component.Component lookup(java.lang.String role)
throws org.apache.avalon.framework.component.ComponentException
Component associated with the given role. For
instance, If the ComponentManager had a
LoggerComponent stored and referenced by role, I would use
the following call:
try
{
MyComponent log;
myComponent = (MyComponent) manager.lookup(MyComponent.ROLE);
}
catch (...)
{
...
}
lookup in interface org.apache.avalon.framework.component.ComponentManagerrole - The role name of the Component to retrieve.
org.apache.avalon.framework.component.ComponentException - if an error occurspublic boolean hasComponent(java.lang.String role)
Component exists for a role.
hasComponent in interface org.apache.avalon.framework.component.ComponentManagerrole - a string identifying the role to check.
public void release(org.apache.avalon.framework.component.Component component)
Component when you are finished with it. This
allows the ComponentManager to handle the End-Of-Life Lifecycle
events associated with the Component. Please note, that no Exceptions
should be thrown at this point. This is to allow easy use of the
ComponentManager system without having to trap Exceptions on a release.
release in interface org.apache.avalon.framework.component.ComponentManagercomponent - The Component we are releasing.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||