本文整理汇总了Java中gov.nih.nci.cagrid.common.FaultHelper.addDescription方法的典型用法代码示例。如果您正苦于以下问题:Java FaultHelper.addDescription方法的具体用法?Java FaultHelper.addDescription怎么用?Java FaultHelper.addDescription使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gov.nih.nci.cagrid.common.FaultHelper
的用法示例。
在下文中一共展示了FaultHelper.addDescription方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDelegatedCredential
import gov.nih.nci.cagrid.common.FaultHelper; //导入方法依赖的package包/类
private GlobusCredential getDelegatedCredential(DelegatedCredentialReference reference) throws InternalErrorFault {
GlobusCredential userCredential = null;
LOG.info("Retrieving delegated credential");
try {
DelegatedCredentialUserClient credentialClient =
new DelegatedCredentialUserClient(reference);
userCredential = credentialClient.getDelegatedCredential();
} catch (Exception ex) {
String message = "Error obtaining delegated credential from CDS";
LOG.error(message, ex);
FaultHelper helper = new FaultHelper(new InternalErrorFault());
helper.addDescription(message);
helper.addDescription(ex.getMessage());
helper.addFaultCause(ex);
throw (InternalErrorFault) helper.getFault();
}
return userCredential;
}
示例2: getDelegatedCredential
import gov.nih.nci.cagrid.common.FaultHelper; //导入方法依赖的package包/类
private GlobusCredential getDelegatedCredential(DelegatedCredentialReference reference) throws CannotSetCredential {
GlobusCredential userCredential = null;
LOG.info("Retrieving delegated credential");
try {
//If there is no host credential, then use the following GlobusCredential.
/* GlobusCredential credential = new GlobusCredential(
"<path-to-cert.pem-file>",
"<path-to-key.pem-file>");
DelegatedCredentialUserClient credentialClient =
new DelegatedCredentialUserClient(reference, credential);
*/
DelegatedCredentialUserClient credentialClient =
new DelegatedCredentialUserClient(reference);
userCredential = credentialClient.getDelegatedCredential();
} catch (Exception ex) {
String message = "Error obtaining delegated credential from CDS";
LOG.error(message, ex);
FaultHelper helper = new FaultHelper(new CannotSetCredential());
helper.addDescription(message);
helper.addDescription(ex.getMessage());
helper.addFaultCause(ex);
throw (CannotSetCredential) helper.getFault();
}
return userCredential;
}
示例3: validateQueryConstraints
import gov.nih.nci.cagrid.common.FaultHelper; //导入方法依赖的package包/类
private void validateQueryConstraints(DCQLQuery query, QueryExecutionParameters parameters) throws FederatedQueryProcessingFault {
// validate the query constraints before trying to do anything else
try {
queryConstraintsValidator.validateAgainstConstraints(query, parameters);
} catch (FederatedQueryProcessingException ex) {
FaultHelper helper = new FaultHelper(new FederatedQueryProcessingFault());
helper.addDescription("Query or query execution parameters violate this service's query constraints");
helper.addDescription(ex.getMessage());
helper.addFaultCause(ex);
throw (FederatedQueryProcessingFault) helper.getFault();
}
}
示例4: setTargetServiceConnectionStatusException
import gov.nih.nci.cagrid.common.FaultHelper; //导入方法依赖的package包/类
public synchronized void setTargetServiceConnectionStatusException(String serviceURL, Exception ex) throws InternalErrorFault, ResourceException {
TargetServiceStatus status = getTargetServiceStatus(serviceURL);
status.setConnectionStatus(ServiceConnectionStatus.Exception);
FaultHelper helper = new FaultHelper(new FederatedQueryProcessingFault());
helper.addDescription("Error parsing data service URL");
helper.addDescription(ex.getMessage());
helper.addFaultCause(ex);
FederatedQueryProcessingFault fqpFault = (FederatedQueryProcessingFault) helper.getFault();
status.setBaseFault(fqpFault);
storeTargetServiceStatus(status);
}
示例5: getTargetServiceStatus
import gov.nih.nci.cagrid.common.FaultHelper; //导入方法依赖的package包/类
private TargetServiceStatus getTargetServiceStatus(String serviceURL) throws InternalErrorFault, ResourceException {
FederatedQueryExecutionStatus executionStatus = getExecutionStatus();
TargetServiceStatus status = null;
if (executionStatus.getTargetServiceStatus() == null) {
executionStatus.setTargetServiceStatus(new TargetServiceStatus[0]);
}
for (TargetServiceStatus storedStatus : executionStatus.getTargetServiceStatus()) {
if (storedStatus.getServiceURL().toString().equals(serviceURL)) {
status = storedStatus;
break;
}
}
if (status == null) {
status = new TargetServiceStatus();
try {
status.setServiceURL(new URI(serviceURL));
} catch (MalformedURIException ex) {
FaultHelper helper = new FaultHelper(new InternalErrorFault());
helper.addDescription("Error parsing data service URL");
helper.addDescription(ex.getMessage());
helper.addFaultCause(ex);
throw (InternalErrorFault) helper.getFault();
}
TargetServiceStatus[] statusArray =
(TargetServiceStatus[]) Utils.appendToArray(executionStatus.getTargetServiceStatus(), status);
executionStatus.setTargetServiceStatus(statusArray);
}
return status;
}