Package com.yahoo.jdisc.http.filter
Class DiscFilterResponse
- java.lang.Object
-
- com.yahoo.jdisc.http.filter.DiscFilterResponse
-
- Direct Known Subclasses:
JdiscFilterResponse
public abstract class DiscFilterResponse extends java.lang.Object
This class was made abstract from 5.27. Test cases that need a concrete instance should create aJdiscFilterResponse
.- Author:
- tejalk
-
-
Constructor Summary
Constructors Constructor Description DiscFilterResponse(com.yahoo.jdisc.http.servlet.ServletOrJdiscHttpResponse parent)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addCookie(JDiscCookieWrapper cookie)
abstract void
addHeader(java.lang.String name, java.lang.String value)
Adds a header with the given name and valuejava.lang.Object
getAttribute(java.lang.String name)
java.util.Enumeration<java.lang.String>
getAttributeNames()
java.util.List<Cookie>
getCookies()
abstract java.lang.String
getHeader(java.lang.String name)
HttpResponse
getParentResponse()
Return the parent HttpResponseint
getStatus()
java.util.List<Cookie>
getUntreatedCookies()
Returns the untreatedCookies from the parent requestcom.yahoo.jdisc.HeaderFields
getUntreatedHeaders()
Returns the untreatedHeaders from the parent requestvoid
removeAttribute(java.lang.String name)
abstract void
removeHeaders(java.lang.String name)
void
sendError(int errorCode)
This method does not actually send the response as it does not have access to responseHandler but just sets the status.void
setAttribute(java.lang.String name, java.lang.Object value)
void
setCookie(java.lang.String name, java.lang.String value)
abstract void
setCookies(java.util.List<Cookie> cookies)
abstract void
setHeader(java.lang.String name, java.lang.String value)
Sets a header with the given name and value.abstract void
setHeaders(java.lang.String name, java.lang.String value)
Sets a header with the given name and value.abstract void
setHeaders(java.lang.String name, java.util.List<java.lang.String> values)
Sets a header with the given name and value.abstract void
setStatus(int status)
-
-
-
Method Detail
-
getAttributeNames
public java.util.Enumeration<java.lang.String> getAttributeNames()
-
getAttribute
public java.lang.Object getAttribute(java.lang.String name)
-
setAttribute
public void setAttribute(java.lang.String name, java.lang.Object value)
-
removeAttribute
public void removeAttribute(java.lang.String name)
-
getUntreatedHeaders
public com.yahoo.jdisc.HeaderFields getUntreatedHeaders()
Returns the untreatedHeaders from the parent request
-
getUntreatedCookies
public java.util.List<Cookie> getUntreatedCookies()
Returns the untreatedCookies from the parent request
-
setHeader
public abstract void setHeader(java.lang.String name, java.lang.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(java.lang.String name)
-
setHeaders
public abstract void setHeaders(java.lang.String name, java.lang.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(java.lang.String name, java.util.List<java.lang.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(java.lang.String name, java.lang.String value)
Adds a header with the given name and value- See Also:
HeaderFields.add(java.lang.String, java.lang.String)
-
getHeader
public abstract java.lang.String getHeader(java.lang.String name)
-
getCookies
public java.util.List<Cookie> getCookies()
-
setCookies
public abstract void setCookies(java.util.List<Cookie> cookies)
-
getStatus
public int getStatus()
-
setStatus
public abstract void setStatus(int status)
-
getParentResponse
public HttpResponse getParentResponse()
Return the parent HttpResponse
-
addCookie
public void addCookie(JDiscCookieWrapper cookie)
-
sendError
public void sendError(int errorCode) throws java.io.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:
java.io.IOException
-
setCookie
public void setCookie(java.lang.String name, java.lang.String value)
-
-