本文整理汇总了Java中org.opendaylight.yangtools.yang.common.RpcResult.getErrors方法的典型用法代码示例。如果您正苦于以下问题:Java RpcResult.getErrors方法的具体用法?Java RpcResult.getErrors怎么用?Java RpcResult.getErrors使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.opendaylight.yangtools.yang.common.RpcResult
的用法示例。
在下文中一共展示了RpcResult.getErrors方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: close
import org.opendaylight.yangtools.yang.common.RpcResult; //导入方法依赖的package包/类
@Override
public void close() {
if(this.listenerRegistration != null){
this.listenerRegistration.close();
}
for(final InstanceIdentifier<?> eventSourceNodeId : joinedEventSources){
try {
final RpcResult<Void> result = sourceService.disJoinTopic(getDisJoinTopicInputArgument(eventSourceNodeId)).get();
if(result.isSuccessful() == false){
for(final RpcError err : result.getErrors()){
LOG.error("Can not destroy topic: [{}] on node: [{}]. Error: {}",getTopicId().getValue(),eventSourceNodeId,err.toString());
}
}
} catch (InterruptedException | ExecutionException ex) {
LOG.error("Can not close event source topic / destroy topic {} on node {}.", this.topicId.getValue(), eventSourceNodeId, ex);
}
}
joinedEventSources.clear();
}
示例2: transform
import org.opendaylight.yangtools.yang.common.RpcResult; //导入方法依赖的package包/类
private DOMRpcResult transform(final RpcResult<?> input) {
if (input.isSuccessful()) {
final Object inputData = input.getResult();
if (inputData instanceof DataContainer) {
return new DefaultDOMRpcResult(codec.toNormalizedNodeRpcData((DataContainer) inputData));
} else {
return new DefaultDOMRpcResult((NormalizedNode<?, ?>) null);
}
}
return new DefaultDOMRpcResult(input.getErrors());
}
示例3: notifyNode
import org.opendaylight.yangtools.yang.common.RpcResult; //导入方法依赖的package包/类
public void notifyNode(final InstanceIdentifier<?> nodeId) {
LOG.debug("Notify node: {}", nodeId);
try {
final RpcResult<JoinTopicOutput> rpcResultJoinTopic = sourceService.joinTopic(getJoinTopicInputArgument(nodeId)).get();
if(rpcResultJoinTopic.isSuccessful() == false){
for(final RpcError err : rpcResultJoinTopic.getErrors()){
LOG.error("Can not join topic: [{}] on node: [{}]. Error: {}",getTopicId().getValue(),nodeId.toString(),err.toString());
}
} else {
joinedEventSources.add(nodeId);
}
} catch (final Exception e) {
LOG.error("Could not invoke join topic for node {}", nodeId);
}
}