当前位置: 首页>>代码示例>>Java>>正文


Java AnyHelper.toSingleString方法代码示例

本文整理汇总了Java中org.globus.wsrf.utils.AnyHelper.toSingleString方法的典型用法代码示例。如果您正苦于以下问题:Java AnyHelper.toSingleString方法的具体用法?Java AnyHelper.toSingleString怎么用?Java AnyHelper.toSingleString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.globus.wsrf.utils.AnyHelper的用法示例。


在下文中一共展示了AnyHelper.toSingleString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createSubscriptionListener

import org.globus.wsrf.utils.AnyHelper; //导入方法依赖的package包/类
private SubscriptionListener createSubscriptionListener(
    final FederatedQueryResultsRetrievalClient resultsClient, final InfoHolder info) {
    SubscriptionListener listener = new SubscriptionListener() {
        public void subscriptionValueChanged(ResourcePropertyValueChangeNotificationType notification) {
            try {
                String newMetadataDocument = AnyHelper.toSingleString(notification.getNewValue().get_any());
                FederatedQueryExecutionStatus status = Utils.deserializeObject(
                    new StringReader(newMetadataDocument), FederatedQueryExecutionStatus.class);
                StringWriter writer = new StringWriter();
                Utils.serializeObject(status, FederatedQueryResultsConstants.FEDERATEDQUERYEXECUTIONSTATUS, writer);
                LOG.debug("GOT NOTIFICATION:");
                LOG.debug(writer.getBuffer().toString());
                if ((info.success == null || !info.success.booleanValue()) && ProcessingStatus.Complete.equals(status.getCurrentStatus())) {
                    enumerateAndVerify(resultsClient);
                    LOG.debug("SETTING SUCCESS STATUS TO TRUE");
                    info.success = Boolean.TRUE;
                }
            } catch (Exception ex) {
                ex.printStackTrace();
                info.success = Boolean.FALSE;
                info.exception = ex;
            }
        }
    };
    return listener;
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:27,代码来源:Dcql2EnumerationQueryExecutionStep.java

示例2: createSubscriptionListener

import org.globus.wsrf.utils.AnyHelper; //导入方法依赖的package包/类
private SubscriptionListener createSubscriptionListener(
    final FederatedQueryResultsClient resultsClient, final InfoHolder info) {
    SubscriptionListener listener = new SubscriptionListener() {
        public void subscriptionValueChanged(ResourcePropertyValueChangeNotificationType notification) {
            try {
                String newMetadataDocument = AnyHelper.toSingleString(notification.getNewValue().get_any());
                FederatedQueryExecutionStatus status = (FederatedQueryExecutionStatus) Utils.deserializeObject(
                    new StringReader(newMetadataDocument), FederatedQueryExecutionStatus.class);
                StringWriter writer = new StringWriter();
                Utils.serializeObject(status, FederatedQueryResultsConstants.FEDERATEDQUERYEXECUTIONSTATUS, writer);
                LOG.debug("GOT NOTIFICATION:");
                LOG.debug(writer.getBuffer().toString());
                if ((info.success == null || !info.success.booleanValue()) && ProcessingStatus.Complete.equals(status.getCurrentStatus())) {
                    enumerateAndVerify(resultsClient);
                    LOG.debug("SETTING SUCCESS STATUS TO TRUE");
                    info.success = Boolean.TRUE;
                }
            } catch (Exception ex) {
                ex.printStackTrace();
                info.success = Boolean.FALSE;
                info.exception = ex;
            }
        }
    };
    return listener;
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:27,代码来源:EnumerationQueryExecutionStep.java

示例3: createSubscriptionListener

import org.globus.wsrf.utils.AnyHelper; //导入方法依赖的package包/类
private SubscriptionListener createSubscriptionListener(
    final FederatedQueryResultsClient resultsClient, final InfoHolder info) {
    SubscriptionListener listener = new SubscriptionListener() {
        private boolean completeDetected = false;
        
        public void subscriptionValueChanged(ResourcePropertyValueChangeNotificationType notification) {
            try {
                String newMetadataDocument = AnyHelper.toSingleString(notification.getNewValue().get_any());
                FederatedQueryExecutionStatus status = Utils.deserializeObject(
                    new StringReader(newMetadataDocument), FederatedQueryExecutionStatus.class);
                StringWriter writer = new StringWriter();
                Utils.serializeObject(status, FederatedQueryResultsConstants.FEDERATEDQUERYEXECUTIONSTATUS, writer);
                if (LOG.isDebugEnabled())  {
                    LOG.debug("GOT NOTIFICATION:");
                    LOG.debug(writer.getBuffer().toString());
                }
                if (!completeDetected && ProcessingStatus.Complete.equals(status.getCurrentStatus())) {
                    completeDetected = true;
                    LOG.debug("EXECUTING TRANSFER AND VERIFY PROCESS");
                    transferAndVerify(resultsClient);
                    LOG.debug("SETTING SUCCESS STATUS TO TRUE");
                    info.success = Boolean.TRUE;
                }
            } catch (Exception ex) {
                ex.printStackTrace();
                info.success = Boolean.FALSE;
                info.exception = ex;
            }
        }
    };
    return listener;
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:33,代码来源:TransferQueryExecutionStep.java

示例4: createSubscriptionListener

import org.globus.wsrf.utils.AnyHelper; //导入方法依赖的package包/类
private SubscriptionListener createSubscriptionListener(
    final FederatedQueryResultsRetrievalClient resultsClient, final InfoHolder info) {
    SubscriptionListener listener = new SubscriptionListener() {
        private boolean completeDetected = false;
        
        public void subscriptionValueChanged(ResourcePropertyValueChangeNotificationType notification) {
            try {
                String newMetadataDocument = AnyHelper.toSingleString(notification.getNewValue().get_any());
                FederatedQueryExecutionStatus status = Utils.deserializeObject(
                    new StringReader(newMetadataDocument), FederatedQueryExecutionStatus.class);
                StringWriter writer = new StringWriter();
                Utils.serializeObject(status, FederatedQueryResultsConstants.FEDERATEDQUERYEXECUTIONSTATUS, writer);
                if (LOG.isDebugEnabled())  {
                    LOG.debug("GOT NOTIFICATION:");
                    LOG.debug(writer.getBuffer().toString());
                }
                if (!completeDetected && ProcessingStatus.Complete.equals(status.getCurrentStatus())) {
                    completeDetected = true;
                    LOG.debug("EXECUTING TRANSFER AND VERIFY PROCESS");
                    transferAndVerify(resultsClient);
                    LOG.debug("SETTING SUCCESS STATUS TO TRUE");
                    info.success = Boolean.TRUE;
                }
            } catch (Exception ex) {
                ex.printStackTrace();
                info.success = Boolean.FALSE;
                info.exception = ex;
            }
        }
    };
    return listener;
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:33,代码来源:Dcql2TransferQueryExecutionStep.java


注:本文中的org.globus.wsrf.utils.AnyHelper.toSingleString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。