use of org.dcache.srm.v2_2.ArrayOfTBringOnlineRequestFileStatus in project dcache by dCache.
the class BringOnlineRequest method getSrmBringOnlineResponse.
private final SrmBringOnlineResponse getSrmBringOnlineResponse() throws SRMInvalidRequestException {
SrmBringOnlineResponse response = new SrmBringOnlineResponse();
response.setReturnStatus(getTReturnStatus());
response.setRequestToken(getTRequestToken());
ArrayOfTBringOnlineRequestFileStatus arrayOfTBringOnlineRequestFileStatus = new ArrayOfTBringOnlineRequestFileStatus();
arrayOfTBringOnlineRequestFileStatus.setStatusArray(getArrayOfTBringOnlineRequestFileStatus());
response.setArrayOfFileStatuses(arrayOfTBringOnlineRequestFileStatus);
response.setRemainingTotalRequestTime(getRemainingLifetimeIn(TimeUnit.SECONDS));
return response;
}
use of org.dcache.srm.v2_2.ArrayOfTBringOnlineRequestFileStatus in project dcache by dCache.
the class BringOnlineRequest method getSrmStatusOfBringOnlineRequestResponse.
public final SrmStatusOfBringOnlineRequestResponse getSrmStatusOfBringOnlineRequestResponse(org.apache.axis.types.URI[] surls) throws SRMInvalidRequestException {
SrmStatusOfBringOnlineRequestResponse response = new SrmStatusOfBringOnlineRequestResponse();
response.setReturnStatus(getTReturnStatus());
TBringOnlineRequestFileStatus[] statusArray = getArrayOfTBringOnlineRequestFileStatus(surls);
response.setArrayOfFileStatuses(new ArrayOfTBringOnlineRequestFileStatus(statusArray));
if (LOGGER.isDebugEnabled()) {
StringBuilder sb = new StringBuilder("getSrmStatusOfBringOnlineRequestResponse:");
sb.append(" StatusCode = ").append(response.getReturnStatus().getStatusCode());
if (statusArray.length > 0) {
sb.append(" FileStatusCodes =");
}
Arrays.stream(statusArray).map(s -> s.getStatus().getStatusCode()).collect(Collectors.groupingBy(Function.identity(), Collectors.counting())).forEach((k, v) -> sb.append(" ").append(k).append(" (").append(v).append(" times)"));
LOGGER.debug(sb.toString());
}
response.setRemainingTotalRequestTime(getRemainingLifetimeIn(TimeUnit.SECONDS));
return response;
}
Aggregations