edu.emory.mathcs.rmix
Class Async

java.lang.Object
  extended byedu.emory.mathcs.rmix.Async

public class Async
extends java.lang.Object

Utility class for managing asynchronous remote interfaces.

Version:
1.0
Author:
Dawid Kurzyniec

Method Summary
static java.lang.String getFullAsyncIntfName(java.lang.Class intf)
          Gets the fully qualified name of the asynchronous interface corresponding to (and extending) the intf.
static boolean isAsync(java.lang.reflect.Method mth)
          Checks if the given method is an asynchronous interface method.
static boolean isCbAsync(java.lang.reflect.Method mth)
          Checks if the given method is an asynchronous callback-based interface method.
static boolean isOneWay(java.lang.reflect.Method mth)
          Checks if the given method is an one-way interface method.
static java.lang.reflect.Method resolveSync(java.lang.reflect.Method mth)
          Finds the synchronous interface method corresponding to the given asynchronous, asynchronous callback-based, or one-way interface method.
static java.lang.String[] tokenizeClassName(java.lang.Class cls)
          Gets the package name, declaring class name, and the simple name of a given class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFullAsyncIntfName

public static java.lang.String getFullAsyncIntfName(java.lang.Class intf)
Gets the fully qualified name of the asynchronous interface corresponding to (and extending) the intf.

Parameters:
intf - synchronous base interface.
Returns:
the fully qualified name of the asynchronous interface corresponding to (and extending) the intf.
To Do:
resolve potential name clashes

isAsync

public static boolean isAsync(java.lang.reflect.Method mth)
Checks if the given method is an asynchronous interface method.

Parameters:
mth - the method to check.
Returns:
true if the given method is an asynchronous interface method, false otherwise.
To Do:
check if not just a user method with misleading signature

isCbAsync

public static boolean isCbAsync(java.lang.reflect.Method mth)
Checks if the given method is an asynchronous callback-based interface method.

Parameters:
mth - the method to check.
Returns:
true if the given method is an asynchronous callback-based interface method, false otherwise.
To Do:
check if not just a user method with misleading signature

isOneWay

public static boolean isOneWay(java.lang.reflect.Method mth)
Checks if the given method is an one-way interface method.

Parameters:
mth - the method to check.
Returns:
true if the given method is an one-way interface method, false otherwise.
To Do:
check if not just a user method with misleading signature

resolveSync

public static java.lang.reflect.Method resolveSync(java.lang.reflect.Method mth)
                                            throws java.lang.NoSuchMethodException,
                                                   InvalidInterfaceException
Finds the synchronous interface method corresponding to the given asynchronous, asynchronous callback-based, or one-way interface method.

Parameters:
mth - asynchronous, asynchronous callback-based, or one-way interface method.
Returns:
the corresponding synchronous interface method.
Throws:
java.lang.NoSuchMethodException
InvalidInterfaceException
To Do:
check if not just a user method with misleading signature

tokenizeClassName

public static java.lang.String[] tokenizeClassName(java.lang.Class cls)
Gets the package name, declaring class name, and the simple name of a given class. The package name and the declaring class name may be null.

Parameters:
cls - the class.
Returns:
the 3-element array of strings containing package name, declaring class name, and the simple name of the cls.