public class MultiMobileProcessServer
Server process allowing the sending of MobileProcess
objects across a network.
This class allows the sending of MobileProcess
objects to a MobileProcessClient
which can then run them. The server forwards on processes received from its in
channel to clients as
they request them. To request a process, the MobileProcessClient
sends a NetChannelLocation
to the servers requestIn
channel. When the server receives this, it creates a new channel from the location
retreives a process from its in
channel and sends it down the newly created channel.
Using this method it is possible to have a single MobileProcessServer
servicing multiple
MobileProcessClient
objects across a network. Class loading is built in to the channels used so the client does
not need to have any knowledge as to the process it will be running.
Copyright: Copyright (c) 2005
Company: Napier University
Constructor and description |
---|
MultiMobileProcessServer
() A public, empty constructor for the creation of an instance. |
MultiMobileProcessServer
(String serviceName, ChannelInput in) Initialises the server by providing the name of the service it will provide and the channel to receive processes from. |
MultiMobileProcessServer
(String serviceName, ChannelInput in, ChannelOutput processRetrieve) Initialises the server by providing the name of the service it will provide and the channel to receive processes from. |
Type | Name and description |
---|---|
void |
run() The run method for the server process. |
void |
sendProcess(MobileProcess theProcess, String processChannelName) Send a given process using a given channel name. |
A public, empty constructor for the creation of an instance.
Initialises the server by providing the name of the service it will provide and the channel to receive processes from.
serviceName
- String Name of channel to be declared with the CNS
.in
- ChannelInput Channel to receive processes from.Initialises the server by providing the name of the service it will provide and the channel to receive processes from. It also creates a channel by which the Server can signal the Sender to send a client process.
serviceName
- String Name of channel to be declared with the CNS
.in
- ChannelInput Channel to receive processes from.processRetrieve
- ChannelOutput Channel to signal to Sender a client process is required.The run method for the server process.
Send a given process using a given channel name. This allows a single process to be sent on a channel as required.
theProcess
- MobileProcess Process to send.processChannelName
- String Name of channel to be declared with the CNS
.JCSP for Java 1.8 generated 14-10-2016 by Jon Kerridge, Edinburgh Napier University - j dot kerridge at napier dot ac dot uk