net.sourceforge.xmote.server
Class RemoteMethod
java.lang.Object
net.sourceforge.xmote.server.RemoteMethod
public class RemoteMethod
- extends java.lang.Object
A RemoteMethod encapsulates the information to match and invoke a method on a
service instance.
- Author:
- Jason Rush
Constructor Summary |
RemoteMethod(java.lang.Object instance,
java.lang.reflect.Method method)
|
Method Summary |
java.lang.Object |
invoke(java.lang.Object[] args)
Invoke this RemoteMethod with the supplied arguments. |
boolean |
matches(java.lang.String methodName,
java.lang.Class<?>[] argTypes)
Check if the supplied information matches this RemoteMethod. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RemoteMethod
public RemoteMethod(java.lang.Object instance,
java.lang.reflect.Method method)
matches
public boolean matches(java.lang.String methodName,
java.lang.Class<?>[] argTypes)
- Check if the supplied information matches this RemoteMethod.
- Parameters:
methodName
- The name of the method to check.argTypes
- The classes of the arguments to check.
- Returns:
- True if the supplied information matches, false otherwise.
invoke
public java.lang.Object invoke(java.lang.Object[] args)
throws java.lang.Exception
- Invoke this RemoteMethod with the supplied arguments.
- Parameters:
args
- The arguments to use in the invocation.
- Returns:
- The value returned from the invocation.
- Throws:
java.lang.Exception
- if Method.invoke(...) throws an exception.
Copyright (C) 2007 Jason Rush. All Rights Reserved.