Class RemoteReferenceModule
- java.lang.Object
- 
- jadex.platform.service.serialization.RemoteReferenceModule
 
- 
 public class RemoteReferenceModule extends java.lang.ObjectThis class implements the rmi handling. It mainly supports: - remote reference management - creation of proxy references for transferring IProxyable objects - creation of proxies on the remote side of a target object - distributed garbage collection for target (remote) objects using reference counting - management of interfaceproperties for metadata such as exclusion or replacement of methods
- 
- 
Field SummaryFields Modifier and Type Field Description protected IComponentIdentifierplatformThe platform cid.protected java.util.List<ITraverseProcessor>processorsThe clone processors.protected java.util.Map<java.lang.Object,jadex.bridge.component.impl.remotecommands.ProxyInfo>proxyinfosThe cache of proxy infos (class -> proxy info).protected java.util.Map<java.lang.Class<?>,boolean[]>referencesThe reference class cache (clazz->boolean (is reference)).static java.util.Map<java.lang.Class<?>,boolean[]>REFERENCESThe predefined reference settings (clazz->boolean (is reference)).
 - 
Constructor SummaryConstructors Constructor Description RemoteReferenceModule(IComponentIdentifier platform)Create a new remote reference module.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidaddCachedMethodValue(jadex.bridge.component.impl.remotecommands.ProxyReference pr, jadex.bridge.component.impl.remotecommands.ProxyInfo pi, java.lang.reflect.Method m, java.lang.Object target)Add a cached method value to the proxy info.voidaddCloneProcessor(ITraverseProcessor proc)Add a clone processor.static jadex.bridge.component.impl.remotecommands.ProxyInfocreateProxyInfo(java.lang.Object target, java.lang.Class<?>[] remoteinterfaces, java.lang.ClassLoader cl, IComponentIdentifier platform)Create a proxy info for a service.java.util.List<ITraverseProcessor>getCloneProcessors()Get the clone processors.static MethodInfo[]getMethodInfo(java.lang.Object iden, java.lang.Class<?> targetclass, boolean noargs)Get method info.java.lang.ObjectgetProxy(jadex.bridge.component.impl.remotecommands.ProxyReference pr, java.lang.ClassLoader classloader)Get a proxy for a proxy reference.jadex.bridge.component.impl.remotecommands.ProxyReferencegetProxyReference(java.lang.Object target, IComponentIdentifier tmpholder, java.lang.ClassLoader cl)Get a remote reference for a component for transport.static java.lang.Class<?>[]getRemoteInterfaces(java.lang.Object object, java.lang.ClassLoader cl)Get the proxy interfaces (empty list if none).protected static jadex.bridge.component.impl.remotecommands.RemoteReferencegetRemoteReference(java.lang.Object target)Get a remote reference.static jadex.bridge.component.impl.remotecommands.RemoteReferencegetRemoteReference(java.lang.Object target, java.lang.Object orig)Get a remote reference.java.lang.ObjectgetTargetObject(jadex.bridge.component.impl.remotecommands.RemoteReference rr)Get a target object per remote reference.booleanisLocalReference(java.lang.Object object)Test if an object has reference semantics.booleanisReference(java.lang.Object object, boolean local)Test if an object has reference semantics.booleanisRemoteObject(java.lang.Object target)Test if an object is a remote object.booleanisRemoteReference(java.lang.Object object)Test if an object has reference semantics.voidremoveCloneProcessor(ITraverseProcessor proc)Remove a clone processor.
 
- 
- 
- 
Field Detail- 
REFERENCESpublic static final java.util.Map<java.lang.Class<?>,boolean[]> REFERENCES The predefined reference settings (clazz->boolean (is reference)).
 - 
platformprotected IComponentIdentifier platform The platform cid.
 - 
referencesprotected java.util.Map<java.lang.Class<?>,boolean[]> references The reference class cache (clazz->boolean (is reference)).
 - 
proxyinfosprotected java.util.Map<java.lang.Object,jadex.bridge.component.impl.remotecommands.ProxyInfo> proxyinfos The cache of proxy infos (class -> proxy info).
 - 
processorsprotected java.util.List<ITraverseProcessor> processors The clone processors.
 
- 
 - 
Constructor Detail- 
RemoteReferenceModulepublic RemoteReferenceModule(IComponentIdentifier platform) Create a new remote reference module.
 
- 
 - 
Method Detail- 
getProxyReferencepublic jadex.bridge.component.impl.remotecommands.ProxyReference getProxyReference(java.lang.Object target, IComponentIdentifier tmpholder, java.lang.ClassLoader cl)Get a remote reference for a component for transport. (Called during marshalling from writer).
 - 
createProxyInfopublic static jadex.bridge.component.impl.remotecommands.ProxyInfo createProxyInfo(java.lang.Object target, java.lang.Class<?>[] remoteinterfaces, java.lang.ClassLoader cl, IComponentIdentifier platform)Create a proxy info for a service.
 - 
addCachedMethodValuepublic static void addCachedMethodValue(jadex.bridge.component.impl.remotecommands.ProxyReference pr, jadex.bridge.component.impl.remotecommands.ProxyInfo pi, java.lang.reflect.Method m, java.lang.Object target)Add a cached method value to the proxy info.
 - 
getMethodInfopublic static MethodInfo[] getMethodInfo(java.lang.Object iden, java.lang.Class<?> targetclass, boolean noargs) Get method info.
 - 
getRemoteReferenceprotected static jadex.bridge.component.impl.remotecommands.RemoteReference getRemoteReference(java.lang.Object target) Get a remote reference.- Parameters:
- target- The (local) remote object.
 
 - 
getRemoteReferencepublic static jadex.bridge.component.impl.remotecommands.RemoteReference getRemoteReference(java.lang.Object target, java.lang.Object orig)Get a remote reference.- Parameters:
- target- The (local) remote object.
 
 - 
getTargetObjectpublic java.lang.Object getTargetObject(jadex.bridge.component.impl.remotecommands.RemoteReference rr) Get a target object per remote reference.- Parameters:
- rr- The remote reference.
- Returns:
- The target object.
 
 - 
getProxypublic java.lang.Object getProxy(jadex.bridge.component.impl.remotecommands.ProxyReference pr, java.lang.ClassLoader classloader)Get a proxy for a proxy reference.- Parameters:
- pr- The proxy reference.
 
 - 
isRemoteReferencepublic boolean isRemoteReference(java.lang.Object object) Test if an object has reference semantics. It is a reference when: - it implements IRemotable - it is an IService, IExternalAccess or IFuture - if the object has used an @Reference annotation at type level - has been explicitly set to be reference
 - 
isRemoteObjectpublic boolean isRemoteObject(java.lang.Object target) Test if an object is a remote object.
 - 
isReferencepublic boolean isReference(java.lang.Object object, boolean local)Test if an object has reference semantics. It is a reference when: - it implements IRemotable - it is an IService, IExternalAccess or IFuture, IIntermediateFuture, IResultListener, IIntermediateResultListener, IChangeListener, IRemoteChangeListener - if the object has used an @Reference annotation at type level
 - 
getRemoteInterfacespublic static java.lang.Class<?>[] getRemoteInterfaces(java.lang.Object object, java.lang.ClassLoader cl)Get the proxy interfaces (empty list if none).
 - 
isLocalReferencepublic boolean isLocalReference(java.lang.Object object) Test if an object has reference semantics. It is a reference when: - it implements IRemotable - it is an IService, IExternalAccess or IFuture - if the object has used an @Reference annotation at type level - has been explicitly set to be reference
 - 
getCloneProcessorspublic java.util.List<ITraverseProcessor> getCloneProcessors() Get the clone processors.- Returns:
- The clone processors.
 
 - 
addCloneProcessorpublic void addCloneProcessor(ITraverseProcessor proc) Add a clone processor.
 - 
removeCloneProcessorpublic void removeCloneProcessor(ITraverseProcessor proc) Remove a clone processor.
 
- 
 
-