@NotStorableClass public final class ProxyManager2 extends Object implements IProxyManagerForObjectIO
| Constructor and Description |
|---|
ProxyManager2(ClassLoaderProvider classLoaderProvider,
ClassInfoFactory classInfoFactory) |
| Modifier and Type | Method and Description |
|---|---|
static void |
changeProxyCallBack(ObjectAndPersistInfo objectAndPersistInfo,
IProxyCallBackToImplement proxyCallBack) |
ClassInfo |
classInfoOfObject(Object object)
get the class of the object, if object is proxy then the class is the
proxied object class.
|
static void |
forceLoad(Object object)
force load of proxy if object is proxy
|
ClassInfoFactory |
getClassInfoFactory() |
int |
getInObjectCount(Object object) |
static ObjectAndPersistInfo |
getObjectAndPersistInfo(Object object) |
int |
getPersistenceId() |
static IProxyCallBackToImplement |
getProxyCallBack(Object object) |
static boolean |
isLoadedOrNotAProxy(Object object)
to know if object is a loaded proxy or a non proxied object
|
static boolean |
isNotAProxyOrIsNotLoaded(Object object) |
static boolean |
isProxyAndIsLoaded(Object object) |
static boolean |
isProxyOrEnhanced(Object object)
to know if object is a proxy or enhanced by java agent
|
static boolean |
isUnloaded(Object object) |
static boolean |
isUseJavaAgent() |
Object |
newInstanceConstruct(ClassInfo objectClassInfo,
Class<?>[] parameterTypes,
Object[] initargs,
StorageInfo storageInfo,
IObjectIOManagerForProxyObjectIO objectIOManager,
DataRecordIdentifier dataRecordIdentifier,
boolean persisted)
create a new proxy instance constructing object
The parameterTypes parameter is an array of
Class objects that identify the constructor's formal
parameter types, in declared order. |
Object |
newInstanceConstruct(ClassInfo objectClassInfo,
StorageInfo storageInfo,
IObjectIOManagerForProxyObjectIO objectIOManager,
DataRecordIdentifier dataRecordIdentifier,
boolean persisted) |
ObjectAndPersistInfo |
newInstanceNoConstruction(ClassInfo objectClassInfo,
StorageInfo storageInfo,
IObjectIOManagerForProxyObjectIO objectIOManager,
DataRecordIdentifier dataRecordIdentifier,
boolean persisted)
create a new proxy instance for a class.
|
static boolean |
proxiedObjectIsLoaded(Object object) |
static void |
setIsLoadedNoSave(Object object) |
void |
setPersistenceId(int persistenceId) |
static void |
setProxyCallBack(ObjectAndPersistInfo objectAndPersistInfo,
IProxyCallBackToImplement proxyCallBack,
boolean exclusiveAccessSession) |
static void |
setUseJavaAgent(boolean useJavaAgent) |
static void |
unload(Object object) |
void |
unloadAndAssociateToCurrentSession(Object object,
IObjectIOManagerForObjectIO objectIOManager) |
public ProxyManager2(ClassLoaderProvider classLoaderProvider, ClassInfoFactory classInfoFactory) throws ProxyException
classLoaderProvider - ProxyExceptionpublic static void setUseJavaAgent(boolean useJavaAgent)
@Fortest public static boolean isUseJavaAgent()
public ClassInfoFactory getClassInfoFactory()
getClassInfoFactory in interface IProxyManagerForObjectIOpublic ObjectAndPersistInfo newInstanceNoConstruction(ClassInfo objectClassInfo, StorageInfo storageInfo, IObjectIOManagerForProxyObjectIO objectIOManager, DataRecordIdentifier dataRecordIdentifier, boolean persisted) throws ProxyException
IProxyManagerForObjectIOnewInstanceNoConstruction in interface IProxyManagerForObjectIOobjectClassInfo - the class of object which for a proxy is to createdobjectIOManager - object input/output manager for state reading from filedataRecordIdentifier - data record identifier of the instance to create, may be null
if not definedpersisted - true if object to be persistedProxyExceptionpublic Object newInstanceConstruct(ClassInfo objectClassInfo, StorageInfo storageInfo, IObjectIOManagerForProxyObjectIO objectIOManager, DataRecordIdentifier dataRecordIdentifier, boolean persisted) throws ProxyException
newInstanceConstruct in interface IProxyManagerForObjectIOProxyExceptionpublic Object newInstanceConstruct(ClassInfo objectClassInfo, Class<?>[] parameterTypes, Object[] initargs, StorageInfo storageInfo, IObjectIOManagerForProxyObjectIO objectIOManager, DataRecordIdentifier dataRecordIdentifier, boolean persisted) throws ProxyException
IProxyManagerForObjectIOparameterTypes parameter is an array of
Class objects that identify the constructor's formal
parameter types, in declared order.newInstanceConstruct in interface IProxyManagerForObjectIOobjectClassInfo - the class of object which for a proxy is to createdparameterTypes - the parameter array.initargs - array of objects to be passed as arguments to the constructor
call; values of primitive types are wrapped in a wrapper
object of the appropriate type (e.g. a float in a
Float)objectIOManager - object input/output manager for state reading from filedataRecordIdentifier - data record identifier of the instance to create, may be null
if not definedpersisted - true if object to be persistedProxyExceptionpublic static boolean isLoadedOrNotAProxy(Object object) throws ProxyException
object - the object to testProxyExceptionpublic static boolean isProxyAndIsLoaded(Object object) throws ProxyException
ProxyExceptionpublic static boolean isUnloaded(Object object) throws ProxyException
ProxyExceptionpublic static boolean isNotAProxyOrIsNotLoaded(Object object) throws ProxyException
ProxyExceptionpublic static boolean proxiedObjectIsLoaded(Object object) throws ProxyException
ProxyExceptionpublic static void setIsLoadedNoSave(Object object) throws ProxyException
ProxyExceptionpublic static void forceLoad(Object object) throws ProxyException
object - the object to load if proxyProxyException@Fortest public static void unload(Object object) throws ProxyException
ProxyExceptionpublic void unloadAndAssociateToCurrentSession(Object object, IObjectIOManagerForObjectIO objectIOManager) throws ProxyException
unloadAndAssociateToCurrentSession in interface IProxyManagerForObjectIOProxyExceptionpublic static boolean isProxyOrEnhanced(Object object)
object - the object to testpublic void setPersistenceId(int persistenceId)
public int getPersistenceId()
public ClassInfo classInfoOfObject(Object object) throws ProxyException
classInfoOfObject in interface IProxyManagerForObjectIOobject - the objectProxyExceptionpublic static void setProxyCallBack(ObjectAndPersistInfo objectAndPersistInfo, IProxyCallBackToImplement proxyCallBack, boolean exclusiveAccessSession) throws ProxyException
ProxyExceptionpublic static void changeProxyCallBack(ObjectAndPersistInfo objectAndPersistInfo, IProxyCallBackToImplement proxyCallBack)
public static IProxyCallBackToImplement getProxyCallBack(Object object)
public static ObjectAndPersistInfo getObjectAndPersistInfo(Object object)
Copyright © 2007-2012 Luc Peuvrier. All Rights Reserved.