class HostResource implements HostApi {

    @Override
    public UpdateHostResponse resume(final String hostNameString) {
        HostName hostName = new HostName(hostNameString);
        try {
            orchestrator.resume(hostName);
        } catch (HostNameNotFoundException e) {
            log.log(Level.FINE, "Host not found: " + hostName);
            throw new NotFoundException(e);
        } catch (UncheckedTimeoutException e) {
            log.log(Level.FINE, "Failed to resume " + hostName + ": " + e.getMessage());
            throw webExceptionFromTimeout("resume", hostName, e);
        } catch (HostStateChangeDeniedException e) {
            log.log(Level.FINE, "Failed to resume " + hostName + ": " + e.getMessage());
            throw webExceptionWithDenialReason("resume", hostName, e);
        }
        return new UpdateHostResponse(hostName.s(), null);
    }

    @Inject public  HostResource(@Component Orchestrator orchestrator, @Context UriInfo uriInfo);

}