com.twistedmatrix.spread.pb
Class RemoteObject
java.lang.Object
|
+--com.twistedmatrix.spread.pb.RemoteObject
- Direct Known Subclasses:
- RemotePathReference, RemoteReference
- public abstract class RemoteObject
- extends java.lang.Object
A remote object with callable methods.
Method Summary |
java.lang.Object |
callRemote(java.lang.String methodName)
Send a command to the remote object, blocking until a response is gotten. |
java.lang.Object |
callRemote(java.lang.String methodName,
java.lang.Object[] args)
Send a command to the remote object, blocking until a response is gotten. |
java.lang.Object |
callRemote(java.lang.String methodName,
java.lang.Object[] args,
PrimitiveMap kwargs)
Send a command to the remote object, blocking until a response is gotten. |
void |
callRemoteAsync(java.lang.String methodName,
java.lang.Object[] args,
Callback callback)
Send a command to the remote object, getting a response asynchronously. |
abstract void |
callRemoteAsync(java.lang.String methodName,
java.lang.Object[] args,
PrimitiveMap kwargs,
Callback callback)
Send a command to the remote object, getting a response asynchronously. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RemoteObject
public RemoteObject()
callRemoteAsync
public abstract void callRemoteAsync(java.lang.String methodName,
java.lang.Object[] args,
PrimitiveMap kwargs,
Callback callback)
throws java.io.IOException
- Send a command to the remote object, getting a response asynchronously.
- Parameters:
methodName
- the method to call.args
- a list of arguments to the method.kwargs
- a dictionary of keyword arguments.callback
- callback for result (if callback is null then no answer will be sent.)
callRemoteAsync
public void callRemoteAsync(java.lang.String methodName,
java.lang.Object[] args,
Callback callback)
throws java.io.IOException
- Send a command to the remote object, getting a response asynchronously.
- Parameters:
methodName
- the method to call.args
- a list of arguments to the method.callback
- callback for result (if callback is null then no answer will be sent.)
callRemote
public java.lang.Object callRemote(java.lang.String methodName,
java.lang.Object[] args,
PrimitiveMap kwargs)
throws RemoteError,
java.io.IOException
- Send a command to the remote object, blocking until a response is gotten.
- Parameters:
args
- a list of arguments to the method.kwargs
- a dictionary of keyword arguments.- Returns:
- the result of the method call.
- Throws:
RemoteError
- if an error was returned.
callRemote
public java.lang.Object callRemote(java.lang.String methodName,
java.lang.Object[] args)
throws RemoteError,
java.io.IOException
- Send a command to the remote object, blocking until a response is gotten.
- Parameters:
args
- a list of arguments to the method.- Returns:
- the result of the method call.
- Throws:
RemoteError
- if an error was returned.
callRemote
public java.lang.Object callRemote(java.lang.String methodName)
throws RemoteError,
java.io.IOException
- Send a command to the remote object, blocking until a response is gotten.
- Returns:
- the result of the method call.
- Throws:
RemoteError
- if an error was returned.