本文整理匯總了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;
}