use of org.dcache.srm.v2_2.SrmGetTransferProtocolsResponse in project dcache by dCache.
the class AxisSrmFileSystem method getTransferProtocols.
@Nonnull
@Override
public TSupportedTransferProtocol[] getTransferProtocols() throws SRMException, RemoteException {
SrmGetTransferProtocolsResponse response = srm.srmGetTransferProtocols(new SrmGetTransferProtocolsRequest());
checkSuccess(response.getReturnStatus());
TSupportedTransferProtocol[] protocolArray = response.getProtocolInfo().getProtocolArray();
return (protocolArray == null) ? new TSupportedTransferProtocol[0] : protocolArray;
}
use of org.dcache.srm.v2_2.SrmGetTransferProtocolsResponse in project dcache by dCache.
the class SrmGetTransferProtocols method getResponse.
public SrmGetTransferProtocolsResponse getResponse() {
if (response == null) {
try {
TSupportedTransferProtocol[] protocols = getSupportedTransferProtocols();
response = new SrmGetTransferProtocolsResponse(new TReturnStatus(TStatusCode.SRM_SUCCESS, null), new ArrayOfTSupportedTransferProtocol(protocols));
} catch (SRMInternalErrorException e) {
LOGGER.error(e.getMessage());
response = getFailedResponse(e.getMessage(), TStatusCode.SRM_INTERNAL_ERROR);
}
}
return response;
}
use of org.dcache.srm.v2_2.SrmGetTransferProtocolsResponse in project dcache by dCache.
the class SrmGetTransferProtocols method getFailedResponse.
public static final SrmGetTransferProtocolsResponse getFailedResponse(String error, TStatusCode statusCode) {
SrmGetTransferProtocolsResponse response = new SrmGetTransferProtocolsResponse();
response.setReturnStatus(new TReturnStatus(statusCode, error));
return response;
}
Aggregations