當前位置: 首頁>>代碼示例>>Java>>正文


Java FaultHelper.addDescription方法代碼示例

本文整理匯總了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;
}
 
開發者ID:NCIP,項目名稱:cagrid-core,代碼行數:19,代碼來源:FQPAsynchronousExecutionUtil.java

示例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;
}
 
開發者ID:NCIP,項目名稱:cagrid-core,代碼行數:29,代碼來源:TavernaWorkflowServiceImplResource.java

示例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();
    }
}
 
開發者ID:NCIP,項目名稱:cagrid-core,代碼行數:13,代碼來源:FederatedQueryProcessorImpl.java

示例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);
}
 
開發者ID:NCIP,項目名稱:cagrid-core,代碼行數:12,代碼來源:ResourcePropertyManager.java

示例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;
}
 
開發者ID:NCIP,項目名稱:cagrid-core,代碼行數:30,代碼來源:ResourcePropertyManager.java


注:本文中的gov.nih.nci.cagrid.common.FaultHelper.addDescription方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。