Class DiscFilterResponse


  • public abstract class DiscFilterResponse
    extends Object
    This class was made abstract from 5.27. Test cases that need a concrete instance should create a JdiscFilterResponse.
    Author:
    tejalk
    • Method Detail

      • getAttribute

        public Object getAttribute​(String name)
      • setAttribute

        public void setAttribute​(String name,
                                 Object value)
      • removeAttribute

        public void removeAttribute​(String name)
      • getUntreatedHeaders

        public com.yahoo.jdisc.HeaderFields getUntreatedHeaders()
        Returns the untreatedHeaders from the parent request
      • getUntreatedCookies

        public List<Cookie> getUntreatedCookies()
        Returns the untreatedCookies from the parent request
      • setHeader

        public abstract void setHeader​(String name,
                                       String value)
        Sets a header with the given name and value.

        If the header had already been set, the new value overwrites the previous one.

      • removeHeaders

        public abstract void removeHeaders​(String name)
      • setHeaders

        public abstract void setHeaders​(String name,
                                        String value)
        Sets a header with the given name and value.

        If the header had already been set, the new value overwrites the previous one.

      • setHeaders

        public abstract void setHeaders​(String name,
                                        List<String> values)
        Sets a header with the given name and value.

        If the header had already been set, the new value overwrites the previous one.

      • addHeader

        public abstract void addHeader​(String name,
                                       String value)
        Adds a header with the given name and value
        See Also:
        HeaderFields.add(java.lang.String, java.lang.String)
      • getHeader

        public abstract String getHeader​(String name)
      • setCookies

        public abstract void setCookies​(List<Cookie> cookies)
      • getStatus

        public int getStatus()
      • setStatus

        public abstract void setStatus​(int status)
      • getParentResponse

        public HttpResponse getParentResponse()
        Return the parent HttpResponse
      • sendError

        public void sendError​(int errorCode)
                       throws IOException
        This method does not actually send the response as it does not have access to responseHandler but just sets the status. The methodName is misleading for historical reasons.
        Throws:
        IOException
      • setCookie

        public void setCookie​(String name,
                              String value)