|
||||||||||
| 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.ServiceManagerReferenceProxy
final class ServiceManagerReferenceProxy
Reference Proxy to a ServiceManager
| Field Summary | |
|---|---|
private org.apache.avalon.framework.service.ServiceManager |
m_serviceManager
Deprecated. |
| Constructor Summary | |
|---|---|
ServiceManagerReferenceProxy(org.apache.avalon.framework.service.ServiceManager serviceManager,
AbstractReferenceProxyLatch latch,
java.lang.String name)
Deprecated. Create a new proxy. |
|
| Method Summary | |
|---|---|
boolean |
hasService(java.lang.String role)
Deprecated. Check to see if a Object exists for a role. |
java.lang.Object |
lookup(java.lang.String role)
Deprecated. Get the Object associated with the given role. |
void |
release(java.lang.Object service)
Deprecated. Return the Object 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.service.ServiceManager m_serviceManager
| Constructor Detail |
|---|
ServiceManagerReferenceProxy(org.apache.avalon.framework.service.ServiceManager serviceManager,
AbstractReferenceProxyLatch latch,
java.lang.String name)
serviceManager - ServiceManager being proxied.latch - Latch wich will be notified when this proxy is finalized.name - Name of the proxy.| Method Detail |
|---|
public java.lang.Object lookup(java.lang.String role)
throws org.apache.avalon.framework.service.ServiceException
Object associated with the given role. For
instance, If the ServiceManager 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.service.ServiceManagerrole - The role name of the Object to retrieve.
Object value
org.apache.avalon.framework.service.ServiceException - if an error occurspublic boolean hasService(java.lang.String role)
Object exists for a role.
hasService in interface org.apache.avalon.framework.service.ServiceManagerrole - a string identifying the role to check.
public void release(java.lang.Object service)
Object when you are finished with it. This
allows the ServiceManager to handle the End-Of-Life Lifecycle
events associated with the Object. Please note, that no
Exception should be thrown at this point. This is to allow easy use of the
ServiceManager system without having to trap Exceptions on a release.
release in interface org.apache.avalon.framework.service.ServiceManagerobject - The Object we are releasing.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||