|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectewe.io.RemoteCallTask
A RemoteCallTask provides an easy way to create an object that is to be controlled remotely via RemoteCalls, or to act as a local proxy for a remote object that will be controlled via RemoteCalls.
The usual way to use this is to construct it using a Steaming connection that has been made between the two communicating entities and then provide methods for servicing the remote calls. That is to say, the default method of setup is to have incoming remote calls be invoked on this very object.
| Field Summary | |
RemoteCallHandler |
handler
This is the handler used for incoming/outgoing calls. |
| Constructor Summary | |
RemoteCallTask()
Create a new RemoteCallTask. |
|
RemoteCallTask(InputStream in,
OutputStream out)
Create a new RemoteCallTask that automatically calls start() with the specified streams. |
|
RemoteCallTask(InputStream in,
OutputStream out,
Object target)
Create a new RemoteCallTask that automatically calls start() with the specified streams and target object. |
|
RemoteCallTask(Stream stream)
Create a new RemoteCallTask that automatically calls start() with the specified stream. |
|
RemoteCallTask(Stream stream,
Object target)
Create a new RemoteCallTask that automatically calls start() with the specified stream and target object. |
|
| Method Summary | |
void |
close()
Close the handler, and the stream. |
protected void |
connectionClosed()
This gets called when the connection between the two RemoteHandlers is closed. |
RemoteCall |
newCall(String method)
Get a new RemoteCall to be invoked on the object on the other side of the connection. |
void |
setEncryption(DataProcessor decryptor,
DataProcessor encryptor)
Set the encryption/decryption to be used by the RemoteCallHandler. |
void |
setEncryption(String password)
Set the encryption/decryption to be used by the RemoteCallHandler. |
void |
setKeys(EncryptionKey remotePublicKey,
EncryptionKey localPrivateKey)
Set the public/private keys for the remote calls. |
void |
start(InputStream in,
OutputStream out,
Object targetObject)
Create a new RemoteCallHandler ready for calls. |
void |
start(RemoteCallHandler handler)
Start using a predefined handler. |
void |
start(Stream stream)
Create a new RemoteCallHandler ready for calls. |
void |
start(Stream stream,
Object targetObject)
Create a new RemoteCallHandler ready for calls. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, toString |
| Field Detail |
public RemoteCallHandler handler
| Constructor Detail |
public RemoteCallTask()
public RemoteCallTask(Stream stream)
stream - A stream that will be used for Remote Call handling.
public RemoteCallTask(Stream stream,
Object target)
stream - A stream that will be used for Remote Call handling.target - The target object that incoming remote calls will be invoked on. If it is null
then incoming remote calls will be invoked on this object.
public RemoteCallTask(InputStream in,
OutputStream out,
Object target)
in - the input stream to the remote application.out - the output stream to the remote application.target - The target object that incoming remote calls will be invoked on. If it is null
then incoming remote calls will be invoked on this object.
public RemoteCallTask(InputStream in,
OutputStream out)
in - the input stream to the remote application.out - the output stream to the remote application.| Method Detail |
public void start(RemoteCallHandler handler)
public void start(Stream stream,
Object targetObject)
stream - A stream that will be used for Remote Call handling. Incoming remote
calls will be invoked on this RemoteCallTask object.targetObject - The target object that incoming remote calls will be invoked on.public void start(Stream stream)
stream - A stream that will be used for Remote Call handling. Incoming remote
calls will be invoked on this RemoteCallTask object.
public void start(InputStream in,
OutputStream out,
Object targetObject)
in - the input stream to the remote application.out - the output stream to the remote application.
public void setEncryption(String password)
throws IOException
IOException
public void setEncryption(DataProcessor decryptor,
DataProcessor encryptor)
throws IOException
IOException
public void setKeys(EncryptionKey remotePublicKey,
EncryptionKey localPrivateKey)
throws IOException
IOExceptionpublic RemoteCall newCall(String method)
method - The method name.protected void connectionClosed()
public void close()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||