Class Request

java.lang.Object
com.yahoo.component.provider.FreezableClass
com.yahoo.processing.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 Summary

    Fields
    Modifier and Type
    Field
    Description
    static final CompoundName
    The name of the chain of Processor instances which will be invoked when executing a request.
    static final CompoundName
    The name of the request property used in the processing framework to store the incoming JDisc request.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a request with no properties
    Request(Properties properties)
    Create a request with the given properties.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a clone of this request.
    Returns the list of errors encountered while processing this request, never null.
    Returns the properties set on this request.

    Methods inherited from class com.yahoo.component.provider.FreezableClass

    ensureNotFrozen, freeze, isFrozen

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • 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 Details

    • 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 Details

    • 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