Class Request

  • All Implemented Interfaces:
    com.yahoo.component.provider.Freezable, Cloneable

    public class Request
    extends com.yahoo.component.provider.FreezableClass
    implements 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 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 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 class com.yahoo.component.provider.FreezableClass