Search in sources :

Example 26 with HealthStatus

use of se.inera.intyg.webcert.web.service.monitoring.dto.HealthStatus in project webcert by sklintyg.

the class HealthCheckApiController method checkUptime.

@GET
@Path("/uptime")
@Produces(MediaType.APPLICATION_XML)
public Response checkUptime() {
    HealthStatus status = healthCheck.checkUptime();
    String xmlResponse = buildXMLResponse(status);
    return Response.ok(xmlResponse).build();
}
Also used : HealthStatus(se.inera.intyg.webcert.web.service.monitoring.dto.HealthStatus) Path(javax.ws.rs.Path) Produces(javax.ws.rs.Produces) GET(javax.ws.rs.GET)

Example 27 with HealthStatus

use of se.inera.intyg.webcert.web.service.monitoring.dto.HealthStatus in project webcert by sklintyg.

the class HealthCheckApiController method checkDB.

@GET
@Path("/db")
@Produces(MediaType.APPLICATION_XML)
public Response checkDB() {
    HealthStatus status = healthCheck.checkDB();
    String xmlResponse = buildXMLResponse(status);
    return Response.ok(xmlResponse).build();
}
Also used : HealthStatus(se.inera.intyg.webcert.web.service.monitoring.dto.HealthStatus) Path(javax.ws.rs.Path) Produces(javax.ws.rs.Produces) GET(javax.ws.rs.GET)

Example 28 with HealthStatus

use of se.inera.intyg.webcert.web.service.monitoring.dto.HealthStatus in project webcert by sklintyg.

the class HealthCheckApiController method checkSignatureQueue.

@GET
@Path("/signature-queue")
@Produces(MediaType.APPLICATION_XML)
public Response checkSignatureQueue() {
    HealthStatus status = healthCheck.checkSignatureQueue();
    String xmlResponse = buildXMLResponse(status);
    return Response.ok(xmlResponse).build();
}
Also used : HealthStatus(se.inera.intyg.webcert.web.service.monitoring.dto.HealthStatus) Path(javax.ws.rs.Path) Produces(javax.ws.rs.Produces) GET(javax.ws.rs.GET)

Example 29 with HealthStatus

use of se.inera.intyg.webcert.web.service.monitoring.dto.HealthStatus in project webcert by sklintyg.

the class HealthCheckServiceImpl method checkIntygstjanst.

@Override
public HealthStatus checkIntygstjanst() {
    Stopwatch stopWatch = Stopwatch.createStarted();
    boolean ok = pingIntygstjanst();
    stopWatch.stop();
    HealthStatus status = createStatusWithTiming(ok, stopWatch);
    logStatus("pingIntygstjanst", status);
    return status;
}
Also used : Stopwatch(com.google.common.base.Stopwatch) HealthStatus(se.inera.intyg.webcert.web.service.monitoring.dto.HealthStatus)

Example 30 with HealthStatus

use of se.inera.intyg.webcert.web.service.monitoring.dto.HealthStatus in project webcert by sklintyg.

the class HealthCheckServiceImpl method checkJMS.

@Override
public HealthStatus checkJMS() {
    Stopwatch stopWatch = Stopwatch.createStarted();
    boolean ok = checkJmsConnection();
    stopWatch.stop();
    HealthStatus status = createStatusWithTiming(ok, stopWatch);
    logStatus("getJMSStatus", status);
    return status;
}
Also used : Stopwatch(com.google.common.base.Stopwatch) HealthStatus(se.inera.intyg.webcert.web.service.monitoring.dto.HealthStatus)

Aggregations

HealthStatus (se.inera.intyg.webcert.web.service.monitoring.dto.HealthStatus)30 Test (org.junit.Test)18 PingForConfigurationType (se.riv.itintegration.monitoring.v1.PingForConfigurationType)8 GET (javax.ws.rs.GET)6 Path (javax.ws.rs.Path)6 Produces (javax.ws.rs.Produces)6 PingForConfigurationResponseType (se.riv.itintegration.monitoring.v1.PingForConfigurationResponseType)5 Stopwatch (com.google.common.base.Stopwatch)4 JMSException (javax.jms.JMSException)2 Query (javax.persistence.Query)2 WebServiceException (javax.xml.ws.WebServiceException)2 BrowserCallback (org.springframework.jms.core.BrowserCallback)2 Time (java.sql.Time)1 SimpleDateFormat (java.text.SimpleDateFormat)1 Date (java.util.Date)1 Connection (javax.jms.Connection)1 Transactional (org.springframework.transaction.annotation.Transactional)1