public class LRMIUtilities extends Object
RemoteMethodCache| Modifier and Type | Field and Description |
|---|---|
static boolean |
KEEP_ALIVE_MODE |
static int |
RECEIVE_BUFFER_SIZE |
static int |
SEND_BUFFER_SIZE |
static boolean |
TCP_NO_DELAY_MODE |
static Integer |
TRAFFIC_CLASS |
| Constructor and Description |
|---|
LRMIUtilities() |
| Modifier and Type | Method and Description |
|---|---|
static Object |
convertToAssignableClassLoader(Object obj,
ClassLoader classLoader)
Convert the desired object into the new object instance assignable from provided ClassLoader.
|
static RemoteMethodCache |
createRemoteMethodCache(List<Class<?>> remoteInterfaces,
Map<String,Integer> methodMapping,
Map<String,LRMIMethodMetadata> overrideMethodsMetadata)
Returns a ~cache of sorted java.rmi.Remote methods of desired exported Remote object.
|
static ConnectionEndpointDetails |
getConnectionEndpointDetails(Object obj) |
static List<Class<?>> |
getDeclaredInterfaces(Class claz,
Class... assignableClasses)
Returns an array of all declared interfaces of desired class (super-classes comes an
account).
|
static List<Class<?>> |
getDeclaredRemoteInterfaces(Class<?> claz)
Returns a list of all
java.rmi.Remote interfaces implemented supplied class. |
static Map<String,IMethod> |
getMappingMethodDescriptor(Class clazz)
Returns the cross instance/platform mapping table of desired class with method
descriptors(method hash).
|
static String |
getMethodDisplayString(IMethod m)
Gets a readable format string that describe the specified method
|
static String |
getMethodNameAndDescriptor(IMethod m)
Returns a string consisting of the given method's name followed by its "method descriptor",
as appropriate for use in the computation of the "method hash".
|
static Class<?>[] |
getProxyInterfaces(Class<?> claz)
Returns an array of all interfaces an lrmi based proxy to the specified class should
implement
|
static PlatformLogicalVersion |
getServicePlatformLogicalVersion(Object obj) |
static String |
getTrafficString(long bytes) |
static void |
initNewSocketProperties(SocketChannel sockChannel) |
static boolean |
isRemoteProxy(Object obj) |
public static final int SEND_BUFFER_SIZE
public static final int RECEIVE_BUFFER_SIZE
public static final boolean KEEP_ALIVE_MODE
public static final boolean TCP_NO_DELAY_MODE
public static final Integer TRAFFIC_CLASS
public static Class<?>[] getProxyInterfaces(Class<?> claz)
claz - proxy classpublic static List<Class<?>> getDeclaredRemoteInterfaces(Class<?> claz)
java.rmi.Remote interfaces implemented supplied class.claz - The class to get all java.rmi.Remote interfaces.public static List<Class<?>> getDeclaredInterfaces(Class claz, Class... assignableClasses)
assignableClasses is null all implemented interface
will be added to array, otherwise only assignable classes.claz - The class to get all interfaces.public static RemoteMethodCache createRemoteMethodCache(List<Class<?>> remoteInterfaces, Map<String,Integer> methodMapping, Map<String,LRMIMethodMetadata> overrideMethodsMetadata)
public static String getMethodNameAndDescriptor(IMethod m)
public static String getMethodDisplayString(IMethod m)
m - displayed methodpublic static Map<String,IMethod> getMappingMethodDescriptor(Class clazz)
clazz - the class to get mapping descriptors from.public static Object convertToAssignableClassLoader(Object obj, ClassLoader classLoader) throws IOException, ClassNotFoundException
Serializable.obj - the object to convert. Can be array as well.classLoader - the desired ClassLoader to convert the passed object.IOException - failed to convertClassNotFoundExceptionpublic static boolean isRemoteProxy(Object obj)
public static PlatformLogicalVersion getServicePlatformLogicalVersion(Object obj)
public static ConnectionEndpointDetails getConnectionEndpointDetails(Object obj)
public static void initNewSocketProperties(SocketChannel sockChannel) throws SocketException
SocketExceptionpublic static String getTrafficString(long bytes)
Copyright © GigaSpaces.