Example usage for org.apache.commons.httpclient.util TimeoutController execute

List of usage examples for org.apache.commons.httpclient.util TimeoutController execute

Introduction

In this page you can find the example usage for org.apache.commons.httpclient.util TimeoutController execute.

Prototype

public static void execute(Thread paramThread, long paramLong) throws TimeoutController.TimeoutException 

Source Link

Usage

From source file:com.gu.management.database.checking.TimeoutConnectionChecker.java

public ConnectionCheckResult check() {
    try {//from  w  w w . j  av  a 2  s.  c  o  m
        TimeoutController.execute(runner, timeout);
        return runner.getResult();
    } catch (TimeoutException e) {
        LOGGER.debug("Got timeout exceeding limit of " + timeout + "ms checking database connection", e);
        return new ConnectionCheckResult(new java.util.concurrent.TimeoutException(e.getMessage()));
    }
}