本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}