A {@link Channel} is a mechanism for two JVMs to communicate overbi-directional {@link InputStream}/ {@link OutputStream} pair.{@link Channel} represents an endpoint of the stream, and thustwo {@link Channel}s are always used in a pair.
Communication is established as soon as two {@link Channel} instancesare created at the end fo the stream pair until the stream is terminated via {@link #close()}.
The basic unit of remoting is an executable {@link Callable} object.An application can create a {@link Callable} object, and execute it remotelyby using the {@link #call(Callable)} method or {@link #callAsync(Callable)} method.
In this sense, {@link Channel} is a mechanism to delegate/offload computationto other JVMs and somewhat like an agent system. This is bit different from remoting technologies like CORBA or web services, where the server exposes a certain functionality that clients invoke.
{@link Callable} object, as well as the return value / exceptions,are transported by using Java serialization. All the necessary class files are also shipped over {@link Channel} on-demand, so there's no need topre-deploy such classes on both JVMs.
{@link Channel} builds its features in a layered model. Its higher-layerfeatures are built on top of its lower-layer features, and they are called layer-0, layer-1, etc.
|
|