Package com.yahoo.jdisc.http.filter
Class DiscFilterResponse
- java.lang.Object
-
- com.yahoo.jdisc.http.filter.DiscFilterResponse
-
public abstract class DiscFilterResponse extends 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(ServletOrJdiscHttpResponse parent)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addCookie(JDiscCookieWrapper cookie)
abstract void
addHeader(String name, String value)
Adds a header with the given name and valueObject
getAttribute(String name)
Enumeration<String>
getAttributeNames()
List<Cookie>
getCookies()
abstract String
getHeader(String name)
HttpResponse
getParentResponse()
Return the parent HttpResponseint
getStatus()
List<Cookie>
getUntreatedCookies()
Returns the untreatedCookies from the parent requestcom.yahoo.jdisc.HeaderFields
getUntreatedHeaders()
Returns the untreatedHeaders from the parent requestvoid
removeAttribute(String name)
abstract void
removeHeaders(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(String name, Object value)
void
setCookie(String name, String value)
abstract void
setCookies(List<Cookie> cookies)
abstract void
setHeader(String name, String value)
Sets a header with the given name and value.abstract void
setHeaders(String name, String value)
Sets a header with the given name and value.abstract void
setHeaders(String name, List<String> values)
Sets a header with the given name and value.abstract void
setStatus(int status)
-
-
-
Constructor Detail
-
DiscFilterResponse
public DiscFilterResponse(ServletOrJdiscHttpResponse parent)
-
-
Method Detail
-
getAttributeNames
public Enumeration<String> getAttributeNames()
-
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)
-
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 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
-
-