Package com.yahoo.jdisc.http.filter
Class DiscFilterResponse
- java.lang.Object
-
- com.yahoo.jdisc.http.filter.DiscFilterResponse
-
public class DiscFilterResponse extends Object
Response type forSecurityResponseFilter
.- Author:
- Tejal Knot, bjorncs
-
-
Constructor Summary
Constructors Constructor Description DiscFilterResponse(HttpResponse parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addCookie(JDiscCookieWrapper cookie)
void
addHeader(String name, String value)
Adds a header with the given name and valueObject
getAttribute(String name)
Enumeration<String>
getAttributeNames()
List<Cookie>
getCookies()
String
getHeader(String name)
HttpResponse
getParentResponse()
Deprecated, for removal: This API element is subject to removal in a future version.Use methods onDiscFilterResponse
insteadint
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)
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)
void
setCookies(List<Cookie> cookies)
void
setHeader(String name, String value)
Sets a header with the given name and value.void
setHeaders(String name, String value)
Sets a header with the given name and value.void
setHeaders(String name, List<String> values)
Sets a header with the given name and value.void
setStatus(int status)
-
-
-
Constructor Detail
-
DiscFilterResponse
public DiscFilterResponse(HttpResponse 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 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 void removeHeaders(String name)
-
setHeaders
public 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 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 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 void setStatus(int status)
-
getParentResponse
@Deprecated(forRemoval=true, since="7.511") public HttpResponse getParentResponse()
Deprecated, for removal: This API element is subject to removal in a future version.Use methods onDiscFilterResponse
insteadReturn 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
-
-