import java.util.concurrent.TimeUnit;
import javax.ws.rs.ProcessingException;
-import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import org.eclipse.jdt.annotation.NonNullByDefault;
private long refreshInterval;
private long hardRefreshInterval;
- private final Client client = ClientBuilder.newClient();
private @Nullable HDPowerViewWebTargets webTargets;
private @Nullable ScheduledFuture<?> pollFuture;
private @Nullable ScheduledFuture<?> hardRefreshFuture;
return;
}
- webTargets = new HDPowerViewWebTargets(client, host);
+ webTargets = new HDPowerViewWebTargets(ClientBuilder.newClient(), host);
refreshInterval = config.refresh;
hardRefreshInterval = config.hardRefresh;
schedulePoll();