Class ResponseStatus

  • All Implemented Interfaces:
    com.yahoo.component.provider.Freezable, com.yahoo.component.provider.ListenableFreezable, com.yahoo.processing.response.Data

    public class ResponseStatus
    extends com.yahoo.processing.response.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, com.yahoo.processing.Request request)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int code()
      Returns the code of this
      java.lang.String toString()  
      • 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 Detail

      • ResponseStatus

        public ResponseStatus​(int code,
                              com.yahoo.processing.Request request)
    • Method Detail

      • code

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object