use of org.dcache.srm.v2_2.SrmAbortRequestResponse in project dcache by dCache.
the class SRMAbortRequestClientV2 method start.
@Override
public void start() throws Exception {
checkCredentialValid();
for (String requestToken : configuration.getArrayOfRequestTokens()) {
try {
SrmAbortRequestRequest request = new SrmAbortRequestRequest();
request.setRequestToken(requestToken);
SrmAbortRequestResponse response = srm.srmAbortRequest(request);
if (response == null) {
throw new IOException(" null SrmAbortRequestResponse for request token " + requestToken);
}
TReturnStatus rs = response.getReturnStatus();
if (rs == null) {
throw new IOException(" null TReturnStatus for request token " + requestToken);
}
if (RequestStatusTool.isFailedRequestStatus(rs)) {
throw new IOException("SrmAbortRequest failed for " + requestToken + ", : " + rs.getStatusCode() + " explanation=" + rs.getExplanation());
}
} catch (Exception e) {
throw e;
}
}
}
use of org.dcache.srm.v2_2.SrmAbortRequestResponse in project dcache by dCache.
the class SRMLsClientV2 method abortRequest.
public void abortRequest() throws Exception {
SrmAbortRequestRequest abortRequest = new SrmAbortRequestRequest();
abortRequest.setRequestToken(requestToken);
SrmAbortRequestResponse abortResponse = srm.srmAbortRequest(abortRequest);
if (abortResponse == null) {
logger.elog(" SrmAbort is null");
} else {
TReturnStatus returnStatus = abortResponse.getReturnStatus();
if (returnStatus == null) {
esay("srmAbort return status is null");
return;
}
say("srmAbortRequest status code=" + returnStatus.getStatusCode());
}
}
use of org.dcache.srm.v2_2.SrmAbortRequestResponse in project dcache by dCache.
the class SRMReserveSpaceClientV2 method abortRequest.
public void abortRequest() throws Exception {
SrmAbortRequestRequest abortRequest = new SrmAbortRequestRequest();
abortRequest.setRequestToken(requestToken);
SrmAbortRequestResponse abortResponse = srm.srmAbortRequest(abortRequest);
if (abortResponse == null) {
logger.elog(" SrmAbort is null");
} else {
TReturnStatus returnStatus = abortResponse.getReturnStatus();
if (returnStatus == null) {
esay("srmAbort return status is null");
return;
}
say("srmAbortRequest status code=" + returnStatus.getStatusCode());
}
}
Aggregations