Class ProxyInfo
- java.lang.Object
-
- jadex.bridge.component.impl.remotecommands.ProxyInfo
-
public class ProxyInfo extends java.lang.Object
Info struct that holds all necessary model information to generate a proxy on the local platform. Is necessary because a proxy cannot be directly created on the remote side and then sent per message to the calling side.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<jadex.commons.MethodInfo>
excluded
The excluded methods.protected java.util.Map<jadex.commons.MethodInfo,IMethodReplacement>
replacements
The replacements for methods (method-info -> replacement method).protected java.util.Set<jadex.commons.MethodInfo>
secure
The secure transport methods.protected java.util.Set<jadex.commons.MethodInfo>
synchronous
The synchronous methods.protected java.util.List<jadex.bridge.ClassInfo>
targetinterfaces
The target class.protected java.util.Map<jadex.commons.MethodInfo,java.lang.Long>
timeouts
The timeouts for methods (method-info -> long).protected java.lang.Class<ITargetResolver>
trcl
The target resolver (for intelligent proxies).protected java.util.Set<jadex.commons.MethodInfo>
uncached
The uncached methods.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addExcludedMethod(jadex.commons.MethodInfo m)
Add an excluded method.void
addMethodReplacement(jadex.commons.MethodInfo method, IMethodReplacement replacement)
Add a replacement.void
addMethodTimeout(jadex.commons.MethodInfo m, long timeout)
Add a timeout for a method.void
addSynchronousMethod(jadex.commons.MethodInfo m)
Add an synchronous method.void
addTargetInterface(jadex.bridge.ClassInfo targetinterface)
Add a target interface.void
addUncachedMethod(jadex.commons.MethodInfo m)
Add an uncached method.java.util.Set<jadex.commons.MethodInfo>
getExcludedMethods()
Get the excluded.IMethodReplacement
getMethodReplacement(java.lang.reflect.Method method)
Get a replacements.java.util.Map<jadex.commons.MethodInfo,IMethodReplacement>
getMethodReplacements()
Get the replacementslong
getMethodTimeout(IComponentIdentifier platform, java.lang.reflect.Method method)
Get a timeout.java.util.Map<jadex.commons.MethodInfo,java.lang.Long>
getMethodTimeouts()
Get the timeoutsjava.util.Set<jadex.commons.MethodInfo>
getSynchronousMethods()
Get the synchronous.jadex.bridge.ClassInfo[]
getTargetInterfaces()
Get the target remote interfaces.java.lang.Class<ITargetResolver>
getTargetResolverClazz()
Get the target determiner clazz.java.util.Set<jadex.commons.MethodInfo>
getUncachedMethods()
Get the uncached.boolean
isExcluded(java.lang.reflect.Method m)
Test if method is excluded.boolean
isReplaced(java.lang.reflect.Method m)
Test if method is replaced.boolean
isSynchronous(java.lang.reflect.Method m)
Test if method is synchronous.boolean
isUncached(java.lang.reflect.Method m)
Test if method is uncached.void
setExcludedMethods(java.util.Set<jadex.commons.MethodInfo> excluded)
Set the excluded.void
setMethodReplacements(java.util.Map<jadex.commons.MethodInfo,IMethodReplacement> replacements)
Set the replacements.void
setMethodTimeouts(java.util.Map<jadex.commons.MethodInfo,java.lang.Long> timeouts)
Set the timeouts.void
setSynchronousMethods(java.util.Set<jadex.commons.MethodInfo> synchronous)
Set the synchronous.void
setTargetInterfaces(jadex.bridge.ClassInfo[] targetinterfaces)
Set the target remote interfaces.void
setTargetResolverClazz(java.lang.Class<ITargetResolver> tdcl)
Set the target determiner class.void
setUncachedMethods(java.util.Set<jadex.commons.MethodInfo> uncached)
Set the uncached.java.lang.String
toString()
Get the string representation.
-
-
-
Field Detail
-
targetinterfaces
protected java.util.List<jadex.bridge.ClassInfo> targetinterfaces
The target class.
-
excluded
protected java.util.Set<jadex.commons.MethodInfo> excluded
The excluded methods.
-
uncached
protected java.util.Set<jadex.commons.MethodInfo> uncached
The uncached methods.
-
synchronous
protected java.util.Set<jadex.commons.MethodInfo> synchronous
The synchronous methods.
-
replacements
protected java.util.Map<jadex.commons.MethodInfo,IMethodReplacement> replacements
The replacements for methods (method-info -> replacement method).
-
timeouts
protected java.util.Map<jadex.commons.MethodInfo,java.lang.Long> timeouts
The timeouts for methods (method-info -> long).
-
secure
protected java.util.Set<jadex.commons.MethodInfo> secure
The secure transport methods.
-
trcl
protected java.lang.Class<ITargetResolver> trcl
The target resolver (for intelligent proxies).
-
-
Method Detail
-
getMethodTimeouts
public java.util.Map<jadex.commons.MethodInfo,java.lang.Long> getMethodTimeouts()
Get the timeouts- Returns:
- The timeouts.
-
setMethodTimeouts
public void setMethodTimeouts(java.util.Map<jadex.commons.MethodInfo,java.lang.Long> timeouts)
Set the timeouts.- Parameters:
timeouts
- The timeouts.
-
getMethodTimeout
public long getMethodTimeout(IComponentIdentifier platform, java.lang.reflect.Method method)
Get a timeout.- Parameters:
method
- The method.- Returns:
- The timeout or -1 if none.
-
addMethodTimeout
public void addMethodTimeout(jadex.commons.MethodInfo m, long timeout)
Add a timeout for a method.- Parameters:
m
- The method info.timeout
- The timeout.
-
getMethodReplacements
public java.util.Map<jadex.commons.MethodInfo,IMethodReplacement> getMethodReplacements()
Get the replacements- Returns:
- The replacements.
-
setMethodReplacements
public void setMethodReplacements(java.util.Map<jadex.commons.MethodInfo,IMethodReplacement> replacements)
Set the replacements.- Parameters:
replacements
- The replacements.
-
addMethodReplacement
public void addMethodReplacement(jadex.commons.MethodInfo method, IMethodReplacement replacement)
Add a replacement.
-
getMethodReplacement
public IMethodReplacement getMethodReplacement(java.lang.reflect.Method method)
Get a replacements.
-
isReplaced
public boolean isReplaced(java.lang.reflect.Method m)
Test if method is replaced.- Parameters:
m
- Method to test.- Returns:
- True, if is replaced.
-
getTargetInterfaces
public jadex.bridge.ClassInfo[] getTargetInterfaces()
Get the target remote interfaces.- Returns:
- the target remote interfaces.
-
setTargetInterfaces
public void setTargetInterfaces(jadex.bridge.ClassInfo[] targetinterfaces)
Set the target remote interfaces.- Parameters:
targetinterfaces
- The targetinterfaces to set.
-
addTargetInterface
public void addTargetInterface(jadex.bridge.ClassInfo targetinterface)
Add a target interface.- Parameters:
targetinterface
- The target interface.
-
getExcludedMethods
public java.util.Set<jadex.commons.MethodInfo> getExcludedMethods()
Get the excluded.- Returns:
- the excluded.
-
setExcludedMethods
public void setExcludedMethods(java.util.Set<jadex.commons.MethodInfo> excluded)
Set the excluded.- Parameters:
excluded
- The excluded to set.
-
addExcludedMethod
public void addExcludedMethod(jadex.commons.MethodInfo m)
Add an excluded method.- Parameters:
Method
- excluded.
-
isExcluded
public boolean isExcluded(java.lang.reflect.Method m)
Test if method is excluded.- Parameters:
m
- Method to test.- Returns:
- True, if is excluded.
-
getUncachedMethods
public java.util.Set<jadex.commons.MethodInfo> getUncachedMethods()
Get the uncached.- Returns:
- the uncached.
-
setUncachedMethods
public void setUncachedMethods(java.util.Set<jadex.commons.MethodInfo> uncached)
Set the uncached.- Parameters:
uncached
- The uncached to set.
-
addUncachedMethod
public void addUncachedMethod(jadex.commons.MethodInfo m)
Add an uncached method.- Parameters:
Method
- excluded.
-
isUncached
public boolean isUncached(java.lang.reflect.Method m)
Test if method is uncached.- Parameters:
m
- Method to test.- Returns:
- True, if is uncached.
-
getSynchronousMethods
public java.util.Set<jadex.commons.MethodInfo> getSynchronousMethods()
Get the synchronous.- Returns:
- the synchronous.
-
setSynchronousMethods
public void setSynchronousMethods(java.util.Set<jadex.commons.MethodInfo> synchronous)
Set the synchronous.- Parameters:
synchronous
- The synchronous to set.
-
addSynchronousMethod
public void addSynchronousMethod(jadex.commons.MethodInfo m)
Add an synchronous method.- Parameters:
Method
- excluded.
-
isSynchronous
public boolean isSynchronous(java.lang.reflect.Method m)
Test if method is synchronous.- Parameters:
m
- Method to test.- Returns:
- True, if is synchronous.
-
getTargetResolverClazz
public java.lang.Class<ITargetResolver> getTargetResolverClazz()
Get the target determiner clazz.- Returns:
- The target determiner clazz
-
setTargetResolverClazz
public void setTargetResolverClazz(java.lang.Class<ITargetResolver> tdcl)
Set the target determiner class.- Parameters:
tdcl
- The target determiner clazz to set
-
toString
public java.lang.String toString()
Get the string representation.- Overrides:
toString
in classjava.lang.Object
- Returns:
- The string representation.
-
-