Class FiredeamonFusionApi
- java.lang.Object
-
- xyz.brandonfl.firedeamon.fusion.api.FiredeamonFusionApi
-
public class FiredeamonFusionApi extends java.lang.ObjectFiredeamon Fusion API for Java.- Author:
- brandon fontany-legall
-
-
Constructor Summary
Constructors Constructor Description FiredeamonFusionApi(java.lang.String url, java.lang.String username, java.lang.String password)Open a new connection with a FireDaemon Fusion instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServiceInformationgetService(java.lang.String serviceName)Fetch information of a specific servicejava.util.List<ServiceInformation>getServices()Fetch FireDaemon servicesvoidupdateServiceStatus(java.lang.String serviceName, ServiceAction serviceAction)Update the status of a specific service.
-
-
-
Constructor Detail
-
FiredeamonFusionApi
public FiredeamonFusionApi(java.lang.String url, java.lang.String username, java.lang.String password)Open a new connection with a FireDaemon Fusion instance- Parameters:
url- url of the FireDaemon Fusion instance. For example https://localhost:20604username- the name of the FireDaemon userpassword- the password for the FireDaemon user- Since:
- 6.0.0
-
-
Method Detail
-
getServices
public java.util.List<ServiceInformation> getServices() throws AuthenticationException, ApiException
Fetch FireDaemon services- Returns:
- List of
ServiceInformation - Throws:
AuthenticationException- In case of authentication exceptionApiException- If the api return an error- Since:
- 6.0.0
-
getService
public ServiceInformation getService(java.lang.String serviceName) throws AuthenticationException, ApiException
Fetch information of a specific service- Parameters:
serviceName- service name asString- Returns:
ServiceInformationof the service- Throws:
AuthenticationException- In case of authentication exceptionApiException- If the api return an error- Since:
- 6.0.0
-
updateServiceStatus
public void updateServiceStatus(java.lang.String serviceName, ServiceAction serviceAction) throws AuthenticationException, ApiExceptionUpdate the status of a specific service. We can :- Start the service with
ServiceAction.START - Restart the service with
ServiceAction.RESTART - Stop the service with
ServiceAction.STOP
- Parameters:
serviceName- service name asStringserviceAction- theServiceActionto perform on the service- Throws:
AuthenticationException- In case of authentication exceptionApiException- If the api return an error- Since:
- 6.0.0
- Start the service with
-
-