use of io.hops.hopsworks.dela.old_dto.SuccessJSON in project hopsworks by logicalclocks.
the class TransferDelaController method cancel.
public void cancel(String publicDSId) throws DelaException {
if (!delaStateController.transferDelaAvailable()) {
throw new DelaException(RESTCodes.DelaErrorCode.DELA_TRANSFER_NOT_AVAILABLE, Level.SEVERE, DelaException.Source.LOCAL);
}
try {
ClientWrapper<SuccessJSON> rc = ClientWrapper.httpInstance(SuccessJSON.class).setTarget(settings.getDELA_TRANSFER_HTTP_ENDPOINT()).setPath("torrent/hops/stop").setPayload(new TorrentId(publicDSId));
SuccessJSON result = rc.doPost();
} catch (IllegalStateException ise) {
throw new DelaException(RESTCodes.DelaErrorCode.COMMUNICATION_FAILURE, Level.SEVERE, DelaException.Source.DELA, null, ise.getMessage(), ise);
}
}
Aggregations