@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
- ProxyException
public static void setUseJavaAgent(boolean useJavaAgent)
@Fortest public static boolean isUseJavaAgent()
public ClassInfoFactory getClassInfoFactory()
getClassInfoFactory
in interface IProxyManagerForObjectIO
public ObjectAndPersistInfo newInstanceNoConstruction(ClassInfo objectClassInfo, StorageInfo storageInfo, IObjectIOManagerForProxyObjectIO objectIOManager, DataRecordIdentifier dataRecordIdentifier, boolean persisted) throws ProxyException
IProxyManagerForObjectIO
newInstanceNoConstruction
in interface IProxyManagerForObjectIO
objectClassInfo
- 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 persistedProxyException
public Object newInstanceConstruct(ClassInfo objectClassInfo, StorageInfo storageInfo, IObjectIOManagerForProxyObjectIO objectIOManager, DataRecordIdentifier dataRecordIdentifier, boolean persisted) throws ProxyException
newInstanceConstruct
in interface IProxyManagerForObjectIO
ProxyException
public Object newInstanceConstruct(ClassInfo objectClassInfo, Class<?>[] parameterTypes, Object[] initargs, StorageInfo storageInfo, IObjectIOManagerForProxyObjectIO objectIOManager, DataRecordIdentifier dataRecordIdentifier, boolean persisted) throws ProxyException
IProxyManagerForObjectIO
parameterTypes
parameter is an array of
Class
objects that identify the constructor's formal
parameter types, in declared order.newInstanceConstruct
in interface IProxyManagerForObjectIO
objectClassInfo
- 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 persistedProxyException
public static boolean isLoadedOrNotAProxy(Object object) throws ProxyException
object
- the object to testProxyException
public static boolean isProxyAndIsLoaded(Object object) throws ProxyException
ProxyException
public static boolean isUnloaded(Object object) throws ProxyException
ProxyException
public static boolean isNotAProxyOrIsNotLoaded(Object object) throws ProxyException
ProxyException
public static boolean proxiedObjectIsLoaded(Object object) throws ProxyException
ProxyException
public static void setIsLoadedNoSave(Object object) throws ProxyException
ProxyException
public static void forceLoad(Object object) throws ProxyException
object
- the object to load if proxyProxyException
@Fortest public static void unload(Object object) throws ProxyException
ProxyException
public void unloadAndAssociateToCurrentSession(Object object, IObjectIOManagerForObjectIO objectIOManager) throws ProxyException
unloadAndAssociateToCurrentSession
in interface IProxyManagerForObjectIO
ProxyException
public 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 IProxyManagerForObjectIO
object
- the objectProxyException
public static void setProxyCallBack(ObjectAndPersistInfo objectAndPersistInfo, IProxyCallBackToImplement proxyCallBack, boolean exclusiveAccessSession) throws ProxyException
ProxyException
public 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.