Package com.slave.application.services
Class SlaveServiceManager
java.lang.Object
com.slave.application.services.SlaveServiceManager
Slave Service Manager Class
This class manages the service provided by the slave instance.
- Version:
- 1.0
- Author:
- Bruno Guiomar
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidBinds the remote interface with the RMI registryprivate voidInitiates the registration process in the coordinator serviceprivate voidCreates a remote method invocation registry (RMI registry)voidstartService(String slaveAddress, int slavePort, String slaveID, String coordinatorAddress, int coordinatorPort) Starts the slave service
-
Field Details
-
slaveInfo
-
coordinatorAddress
-
coordinatorPort
private int coordinatorPort -
slaveAddress
-
-
Constructor Details
-
SlaveServiceManager
public SlaveServiceManager()Class Default Constructor
-
-
Method Details
-
startService
public void startService(String slaveAddress, int slavePort, String slaveID, String coordinatorAddress, int coordinatorPort) Starts the slave service- Parameters:
slaveAddress- Slave network address (IP)slavePort- Slave network portslaveID- Slave short identificationcoordinatorAddress- Coordinator network address (IP)coordinatorPort- Coordinator network port
-
createRegistry
private void createRegistry()Creates a remote method invocation registry (RMI registry) -
bindRemoteInterface
private void bindRemoteInterface()Binds the remote interface with the RMI registry -
connect2Coordinator
private void connect2Coordinator()Initiates the registration process in the coordinator service
-