Package org.elasticsearch.common.xcontent

Examples of org.elasticsearch.common.xcontent.XContentBuilder.endObject()


                    builder.startObject();
                    builder.field("ok", true);

                    buildBroadcastShardsHeader(builder, response);

                    builder.endObject();
                    channel.sendResponse(new XContentRestResponse(request, OK, builder));
                } catch (Exception e) {
                    onFailure(e);
                }
            }
View Full Code Here


                    builder.startObject("nodes");
                    for (NodesRestartResponse.NodeRestartResponse nodeInfo : result) {
                        builder.startObject(nodeInfo.node().id());
                        builder.field("name", nodeInfo.node().name());
                        builder.endObject();
                    }
                    builder.endObject();

                    builder.endObject();
                    channel.sendResponse(new XContentRestResponse(request, RestStatus.OK, builder));
View Full Code Here

                    for (NodesRestartResponse.NodeRestartResponse nodeInfo : result) {
                        builder.startObject(nodeInfo.node().id());
                        builder.field("name", nodeInfo.node().name());
                        builder.endObject();
                    }
                    builder.endObject();

                    builder.endObject();
                    channel.sendResponse(new XContentRestResponse(request, RestStatus.OK, builder));
                } catch (Exception e) {
                    onFailure(e);
View Full Code Here

                        builder.field("name", nodeInfo.node().name());
                        builder.endObject();
                    }
                    builder.endObject();

                    builder.endObject();
                    channel.sendResponse(new XContentRestResponse(request, RestStatus.OK, builder));
                } catch (Exception e) {
                    onFailure(e);
                }
            }
View Full Code Here

                    builder.startObject("nodes");
                    for (DiscoveryNode node : response.nodes()) {
                        builder.startObject(node.id());
                        builder.field("name", node.name());
                        builder.endObject();
                    }
                    builder.endObject();

                    builder.endObject();
                    channel.sendResponse(new XContentRestResponse(request, RestStatus.OK, builder));
View Full Code Here

                    for (DiscoveryNode node : response.nodes()) {
                        builder.startObject(node.id());
                        builder.field("name", node.name());
                        builder.endObject();
                    }
                    builder.endObject();

                    builder.endObject();
                    channel.sendResponse(new XContentRestResponse(request, RestStatus.OK, builder));
                } catch (Exception e) {
                    onFailure(e);
View Full Code Here

                        builder.field("name", node.name());
                        builder.endObject();
                    }
                    builder.endObject();

                    builder.endObject();
                    channel.sendResponse(new XContentRestResponse(request, RestStatus.OK, builder));
                } catch (Exception e) {
                    onFailure(e);
                }
            }
View Full Code Here

                        builder.startObject("attributes");
                        for (Map.Entry<String, String> attr : nodeInfo.node().attributes().entrySet()) {
                            builder.field(attr.getKey(), attr.getValue());
                        }
                        builder.endObject();

                        for (Map.Entry<String, String> nodeAttribute : nodeInfo.attributes().entrySet()) {
                            builder.field(nodeAttribute.getKey(), nodeAttribute.getValue());
                        }
View Full Code Here

                            builder.startObject("settings");
                            Settings settings = settingsFilter.filterSettings(nodeInfo.settings());
                            for (Map.Entry<String, String> entry : settings.getAsMap().entrySet()) {
                                builder.field(entry.getKey(), entry.getValue());
                            }
                            builder.endObject();
                        }

                        if (nodeInfo.os() != null) {
                            nodeInfo.os().toXContent(builder, request);
                        }
View Full Code Here

                        }
                        if (nodeInfo.http() != null) {
                            nodeInfo.http().toXContent(builder, request);
                        }

                        builder.endObject();
                    }
                    builder.endObject();

                    builder.endObject();
                    channel.sendResponse(new XContentRestResponse(request, RestStatus.OK, builder));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.