|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.remoting.LocalChannel
public class LocalChannel
VirtualChannel that performs computation on the local JVM.
| Constructor Summary | |
|---|---|
LocalChannel(ExecutorService executor)
|
|
| Method Summary | ||
|---|---|---|
|
call(Callable<V,T> callable)
Makes a remote procedure call. |
|
|
callAsync(Callable<V,T> callable)
Makes an asynchronous remote procedure call. |
|
void |
close()
Performs an orderly shut down of this channel (and the remote peer.) |
|
|
export(Class<T> intf,
T instance)
Exports an object for remoting to the other Channel
by creating a remotable proxy. |
|
void |
join()
Waits for this Channel to be closed down. |
|
void |
join(long timeout)
Waits for this Channel to be closed down, but only up the given milliseconds. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LocalChannel(ExecutorService executor)
| Method Detail |
|---|
public <V,T extends Throwable> V call(Callable<V,T> callable)
throws T extends Throwable
VirtualChannel
Sends Callable to the remote system, executes it, and returns its result.
call in interface VirtualChannelT extends Throwable
public <V,T extends Throwable> Future<V> callAsync(Callable<V,T> callable)
throws IOException
VirtualChannel
Similar to VirtualChannel.call(Callable) but returns immediately.
The result of the Callable can be obtained through the Future object.
callAsync in interface VirtualChannelFuture object that can be used to wait for the completion.
IOException - If there's an error during the communication.public void close()
VirtualChannel
close in interface VirtualChannel
public void join()
throws InterruptedException
VirtualChannelChannel to be closed down.
The close-down of a Channel might be initiated locally or remotely.
join in interface VirtualChannelInterruptedException - If the current thread is interrupted while waiting for the completion.
public void join(long timeout)
throws InterruptedException
VirtualChannelChannel to be closed down, but only up the given milliseconds.
join in interface VirtualChannelInterruptedException - If the current thread is interrupted while waiting for the completion.
public <T> T export(Class<T> intf,
T instance)
VirtualChannelChannel
by creating a remotable proxy.
All the parameters and return values must be serializable.
export in interface VirtualChannelintf - Interface to be remoted.
Channel, and calling methods on it from the remote side
will invoke the same method on the given local instance object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||