当前位置: 首页>>代码示例>>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;未经允许,请勿转载。