@Override protected GetPipelineResponse newResponse() { return new GetPipelineResponse(); }
@Override public GetPipelineResponse newResponse() { return new GetPipelineResponse(); } }
@Override protected void masterOperation(GetPipelineRequest request, ClusterState state, ActionListener<GetPipelineResponse> listener) throws Exception { listener.onResponse(new GetPipelineResponse(IngestService.getPipelines(state, request.getIds()))); }
@Override public GetPipelineResponse newResponse() { return new GetPipelineResponse(); } }
@Override public GetPipelineResponse newResponse() { return new GetPipelineResponse(); } }
@Override protected GetPipelineResponse newResponse() { return new GetPipelineResponse(); }
@Override public GetPipelineResponse newResponse() { return new GetPipelineResponse(); } }
@Override protected GetPipelineResponse newResponse() { return new GetPipelineResponse(); }
@Override protected GetPipelineResponse newResponse() { return new GetPipelineResponse(); }
/** * * @param parser the parser for the XContent that contains the serialized GetPipelineResponse. * @return an instance of GetPipelineResponse read from the parser * @throws IOException If the parsing fails */ public static GetPipelineResponse fromXContent(XContentParser parser) throws IOException { ensureExpectedToken(XContentParser.Token.START_OBJECT, parser.nextToken(), parser::getTokenLocation); List<PipelineConfiguration> pipelines = new ArrayList<>(); while(parser.nextToken().equals(Token.FIELD_NAME)) { String pipelineId = parser.currentName(); parser.nextToken(); XContentBuilder contentBuilder = XContentBuilder.builder(parser.contentType().xContent()); contentBuilder.generator().copyCurrentStructure(parser); PipelineConfiguration pipeline = new PipelineConfiguration( pipelineId, BytesReference.bytes(contentBuilder), contentBuilder.contentType() ); pipelines.add(pipeline); } ensureExpectedToken(XContentParser.Token.END_OBJECT, parser.currentToken(), parser::getTokenLocation); return new GetPipelineResponse(pipelines); }
@Override protected void masterOperation(GetPipelineRequest request, ClusterState state, ActionListener<GetPipelineResponse> listener) throws Exception { listener.onResponse(new GetPipelineResponse(pipelineStore.getPipelines(state, request.getIds()))); }
@Override protected void masterOperation(GetPipelineRequest request, ClusterState state, ActionListener<GetPipelineResponse> listener) throws Exception { listener.onResponse(new GetPipelineResponse(pipelineStore.getPipelines(state, request.getIds()))); }
@Override protected void masterOperation(GetPipelineRequest request, ClusterState state, ActionListener<GetPipelineResponse> listener) throws Exception { listener.onResponse(new GetPipelineResponse(IngestService.getPipelines(state, request.getIds()))); }
/** * * @param parser the parser for the XContent that contains the serialized GetPipelineResponse. * @return an instance of GetPipelineResponse read from the parser * @throws IOException If the parsing fails */ public static GetPipelineResponse fromXContent(XContentParser parser) throws IOException { ensureExpectedToken(XContentParser.Token.START_OBJECT, parser.nextToken(), parser::getTokenLocation); List<PipelineConfiguration> pipelines = new ArrayList<>(); while(parser.nextToken().equals(Token.FIELD_NAME)) { String pipelineId = parser.currentName(); parser.nextToken(); XContentBuilder contentBuilder = XContentBuilder.builder(parser.contentType().xContent()); contentBuilder.generator().copyCurrentStructure(parser); PipelineConfiguration pipeline = new PipelineConfiguration( pipelineId, BytesReference.bytes(contentBuilder), contentBuilder.contentType() ); pipelines.add(pipeline); } ensureExpectedToken(XContentParser.Token.END_OBJECT, parser.currentToken(), parser::getTokenLocation); return new GetPipelineResponse(pipelines); }
/** * * @param parser the parser for the XContent that contains the serialized GetPipelineResponse. * @return an instance of GetPipelineResponse read from the parser * @throws IOException If the parsing fails */ public static GetPipelineResponse fromXContent(XContentParser parser) throws IOException { ensureExpectedToken(XContentParser.Token.START_OBJECT, parser.nextToken(), parser::getTokenLocation); List<PipelineConfiguration> pipelines = new ArrayList<>(); while(parser.nextToken().equals(Token.FIELD_NAME)) { String pipelineId = parser.currentName(); parser.nextToken(); XContentBuilder contentBuilder = XContentBuilder.builder(parser.contentType().xContent()); contentBuilder.generator().copyCurrentStructure(parser); PipelineConfiguration pipeline = new PipelineConfiguration( pipelineId, BytesReference.bytes(contentBuilder), contentBuilder.contentType() ); pipelines.add(pipeline); } ensureExpectedToken(XContentParser.Token.END_OBJECT, parser.currentToken(), parser::getTokenLocation); return new GetPipelineResponse(pipelines); }