Class ResponseStatus

java.lang.Object
com.yahoo.component.provider.FreezableClass
com.yahoo.component.provider.ListenableFreezableClass
com.yahoo.processing.response.AbstractData
com.yahoo.processing.handler.ResponseStatus
All Implemented Interfaces:
com.yahoo.component.provider.Freezable, com.yahoo.component.provider.ListenableFreezable, Data

public class ResponseStatus extends AbstractData

A data item holding a response HTTP status code. If this is present in a Response it will determine the HTTP status of the response (when returned over HTTP), regardless of any errors present in the result which might otherwise determine the response status.

If several ResponseStatus instances are present, the first one encountered by a depth-first search through the data composite tree will be used.

Note that this must be added to the response before any response data is writable to take effect.

Author:
bratseth
  • Constructor Summary

    Constructors
    Constructor
    Description
    ResponseStatus(int code, Request request)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the code of this
     

    Methods inherited from class com.yahoo.processing.response.AbstractData

    request

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

    addFreezeListener, clone, freeze

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

    ensureNotFrozen, isFrozen

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.yahoo.component.provider.Freezable

    freeze, isFrozen

    Methods inherited from interface com.yahoo.component.provider.ListenableFreezable

    addFreezeListener
  • Constructor Details

    • ResponseStatus

      public ResponseStatus(int code, Request request)
  • Method Details

    • code

      public int code()
      Returns the code of this
    • toString

      public String toString()
      Overrides:
      toString in class Object