Package com.yahoo.processing
Class Request
- java.lang.Object
-
- com.yahoo.component.provider.FreezableClass
-
- com.yahoo.processing.Request
-
- All Implemented Interfaces:
com.yahoo.component.provider.Freezable
,java.lang.Cloneable
public class Request extends com.yahoo.component.provider.FreezableClass implements java.lang.Cloneable
A generic processing request. The request contains a set of properties that are used to communicate information from the client making the processing request (e.g http parameters), and as a blackboard to pass information between processors.- Author:
- bratseth
-
-
Field Summary
Fields Modifier and Type Field Description static CompoundName
CHAIN
The name of the chain of Processor instances which will be invoked when executing a request.static CompoundName
JDISC_REQUEST
The name of the request property used in the processing framework to store the incoming JDisc request.
-
Constructor Summary
Constructors Constructor Description Request()
Creates a request with no propertiesRequest(Properties properties)
Create a request with the given properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Request
clone()
Returns a clone of this request.java.util.List<ErrorMessage>
errors()
Returns the list of errors encountered while processing this request, never null.Properties
properties()
Returns the properties set on this request.
-
-
-
Field Detail
-
CHAIN
public static final CompoundName CHAIN
The name of the chain of Processor instances which will be invoked when executing a request.
-
JDISC_REQUEST
public static final CompoundName JDISC_REQUEST
The name of the request property used in the processing framework to store the incoming JDisc request.
-
-
Constructor Detail
-
Request
public Request()
Creates a request with no properties
-
Request
public Request(Properties properties)
Create a request with the given properties. This Request gains ownership of the given properties and may edit them in the future.- Parameters:
properties
- the properties owner by this
-
-
Method Detail
-
properties
public Properties properties()
Returns the properties set on this request. Processors may add properties to send messages to downstream processors.
-
errors
public java.util.List<ErrorMessage> errors()
Returns the list of errors encountered while processing this request, never null. This is a live reference to the modifiable list of errors of this.
-
clone
public Request clone()
Returns a clone of this request.The properties are logically deeply cloned such that changes to properties in the clone are independent.
The errors of the original request are not cloned into the new instance: It will have an empty list of errors.
- Overrides:
clone
in classcom.yahoo.component.provider.FreezableClass
-
-