Class DataServiceSrv
- java.lang.Object
-
- es.bsc.dataclay.dataservice.server.DataServiceSrv
-
public final class DataServiceSrv extends Object
This class implements the service part of the Data Service.
-
-
Field Summary
Fields Modifier and Type Field Description booleanrunningServerIndicates if server is running or not.
-
Constructor Summary
Constructors Constructor Description DataServiceSrv(CfgDataService thecfgDS, CfgLogic thecfgLM)Start server
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddisconnectFromOthers()Disconnect DS from othersstatic voiddoExit(int exitStatus)DataServicegetDataService()Used in mock testingstatic DataServiceSrvgetForTest(String[] args)static voidmain(String[] args)voidstart()Start service.voidstopService()Unbinds the service
-
-
-
Constructor Detail
-
DataServiceSrv
public DataServiceSrv(CfgDataService thecfgDS, CfgLogic thecfgLM) throws Exception
Start server- Parameters:
thecfgDS- DS configurationthecfgLM- LM configuration- Throws:
Exception- if some exception occurs
-
-
Method Detail
-
start
public void start() throws ExceptionStart service.- Throws:
Exception- if some exception occurs
-
doExit
public static void doExit(int exitStatus)
-
stopService
public void stopService()
Unbinds the service
-
disconnectFromOthers
public void disconnectFromOthers()
Disconnect DS from others
-
main
public static void main(String[] args) throws Exception
- Parameters:
args- args[0] == the manager configuration file path with the configuration for backends and so on- Throws:
Exception- if some exception was thrown
-
getForTest
public static DataServiceSrv getForTest(String[] args) throws Exception
- Parameters:
args- args[0] == the manager configuration file path with the configuration for backends and so on- Returns:
- DSSrv for test.
- Throws:
Exception- if some exception was thrown
-
getDataService
public DataService getDataService()
Used in mock testing- Returns:
- DataSercice
-
-