|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.fortress.impl.factory.AbstractObjectFactory org.apache.avalon.fortress.impl.factory.ProxyObjectFactory
An ObjectFactory that delegates to another ObjectFactory and proxies results of that factory.
Field Summary |
Fields inherited from class org.apache.avalon.fortress.impl.factory.AbstractObjectFactory |
m_delegateFactory |
Fields inherited from interface org.apache.excalibur.instrument.Instrumentable |
EMPTY_INSTRUMENT_ARRAY, EMPTY_INSTRUMENTABLE_ARRAY |
Constructor Summary | |
ProxyObjectFactory(org.d_haven.mpool.ObjectFactory objectFactory)
Create factory that delegates to specified factory. |
Method Summary | |
static Component |
createProxy(java.lang.Object service)
Get the Component wrapped in the proxy. |
void |
dispose(java.lang.Object object)
Dispose of objects created by this factory. |
static java.lang.Object |
getObject(java.lang.Object proxy)
Get the target object from specified proxy. |
java.lang.Object |
newInstance()
Create a new instance from delegated factory and proxy it. |
Methods inherited from class org.apache.avalon.fortress.impl.factory.AbstractObjectFactory |
getChildInstrumentables, getCreatedClass, getInstrumentableName, getInstruments, guessWorkInterfaces, setInstrumentableName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ProxyObjectFactory(org.d_haven.mpool.ObjectFactory objectFactory) throws java.lang.NullPointerException
objectFactory
- the factory to delegate to
java.lang.NullPointerException
- if the supplied object factory is nullMethod Detail |
public java.lang.Object newInstance() throws java.lang.Exception
newInstance
in interface org.d_haven.mpool.ObjectFactory
newInstance
in class AbstractObjectFactory
java.lang.Exception
- if unable to create new instanceObjectFactory.newInstance()
public void dispose(java.lang.Object object) throws java.lang.Exception
dispose
in interface org.d_haven.mpool.ObjectFactory
dispose
in class AbstractObjectFactory
object
- the proxied object
java.lang.Exception
- if unable to dispose of objectObjectFactory.dispose(Object)
public static Component createProxy(java.lang.Object service)
service
- the service object to proxypublic static java.lang.Object getObject(java.lang.Object proxy)
proxy
- the proxy object
java.lang.NullPointerException
- if unable to aquire target object,
or specified object is not a proxy
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |