Package org.jcsp.net.cns
Class CNSService.ServiceProcess
- java.lang.Object
-
- org.jcsp.net.cns.CNSService.ServiceProcess
-
- All Implemented Interfaces:
CSProcess
- Enclosing class:
- CNSService
private class CNSService.ServiceProcess extends java.lang.Object implements CSProcess
The main process of the service. This handles a single request at a time. Register, lease and deregister requests are sent to the server and then the process waits for a response. Resolve requests are sent to the server after which the process resumes serving requests. The server will send a response back to this process once a name matching the request has been registered.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) ChannelOutput
startedChan
-
Constructor Summary
Constructors Constructor Description ServiceProcess(ChannelOutput startedChan)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private CNSMessage
getRegistrationReply()
void
run()
This defines the actions of the process.private void
stopCNSService()
This stops the CNS Service and removes its Channel from IndexManager.
-
-
-
Field Detail
-
startedChan
ChannelOutput startedChan
-
-
Constructor Detail
-
ServiceProcess
ServiceProcess(ChannelOutput startedChan)
-
-
Method Detail
-
run
public void run()
Description copied from interface:CSProcess
This defines the actions of the process.
-
getRegistrationReply
private CNSMessage getRegistrationReply()
-
stopCNSService
private void stopCNSService()
This stops the CNS Service and removes its Channel from IndexManager. It sets the running indicator to false.
-
-