|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ojb.broker.core.proxy.VirtualProxy
Proxy base class. can be used to implement lazy materialization techniques.
as a sample application.
,
Serialized FormConstructor Summary | |
VirtualProxy()
Creates a new, uninitialized proxy. |
|
VirtualProxy(java.lang.reflect.InvocationHandler handler)
Create a VirtualProxy that uses the given invocation handler. |
|
VirtualProxy(PBKey key,
Identity oid)
Creates a VirtualProxy for the subject with the given identity. |
Method Summary | |
boolean |
alreadyMaterialized()
Determines whether this proxy already has been materialized. |
static java.lang.Object |
createProxy(PBKey key,
java.lang.Class proxyClass,
Identity realSubjectsIdentity)
Creates VirtualProxy instances of a given proxy subclass and the real subject's identity. |
static IndirectionHandler |
getIndirectionHandler(VirtualProxy proxy)
Returns the indirection handler of the given proxy. |
java.lang.Object |
getRealSubject()
Returns the proxies real subject. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public VirtualProxy()
public VirtualProxy(PBKey key, Identity oid)
key
- The key of the PersistenceBrokeroid
- The identity of the subjectpublic VirtualProxy(java.lang.reflect.InvocationHandler handler)
handler
- The indirection handler of the proxyMethod Detail |
public static IndirectionHandler getIndirectionHandler(VirtualProxy proxy)
proxy
- The proxy
public boolean alreadyMaterialized()
true
if the real subject already been loadedpublic static java.lang.Object createProxy(PBKey key, java.lang.Class proxyClass, Identity realSubjectsIdentity)
key
- The key of the PersistenceBrokerproxyClass
- The Proxy classrealSubjectsIdentity
- The identity of the subject
PersistenceBrokerException
- If there is an error creating the proxy objectpublic java.lang.Object getRealSubject() throws PersistenceBrokerException
PersistenceBrokerException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |