blob: d623fbfeaccbb9015c31c34e158583c237cffb1b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.processing.test.documentation;
import com.yahoo.processing.*;
import com.yahoo.processing.execution.Execution;
import com.yahoo.processing.test.ProcessorLibrary.StringData;
public class ExampleProcessor extends Processor {
@SuppressWarnings("unchecked")
@Override
public Response process(Request request, Execution execution) {
// Process the Request:
request.properties().set("foo","bar");
// Pass it down the chain to get a response
Response response=execution.process(request);
// process the response
response.data().add(new StringData(request,"Hello, world!"));
return response;
}
}
|