Package org.keycloak.services
Class HttpResponseImpl
java.lang.Object
org.keycloak.services.HttpResponseImpl
- All Implemented Interfaces:
HttpResponse
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a value to the current list of values for the header with the givenname
.int
Gets a status code.void
setCookieIfAbsent
(jakarta.ws.rs.core.NewCookie newCookie) Sets a new cookie only if not yet set.void
Set a header.void
setStatus
(int statusCode) Sets a status code.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.keycloak.http.HttpResponse
setCookieIfAbsent
-
Constructor Details
-
HttpResponseImpl
public HttpResponseImpl(org.jboss.resteasy.spi.HttpResponse delegate)
-
-
Method Details
-
getStatus
public int getStatus()Description copied from interface:HttpResponse
Gets a status code.- Specified by:
getStatus
in interfaceHttpResponse
-
setStatus
public void setStatus(int statusCode) Description copied from interface:HttpResponse
Sets a status code.- Specified by:
setStatus
in interfaceHttpResponse
- Parameters:
statusCode
- the status code
-
addHeader
Description copied from interface:HttpResponse
Add a value to the current list of values for the header with the givenname
.- Specified by:
addHeader
in interfaceHttpResponse
- Parameters:
name
- the header namevalue
- the header value
-
setHeader
Description copied from interface:HttpResponse
Set a header. Any existing values will be replaced.- Specified by:
setHeader
in interfaceHttpResponse
- Parameters:
name
- the header namevalue
- the header value
-
setCookieIfAbsent
public void setCookieIfAbsent(jakarta.ws.rs.core.NewCookie newCookie) Description copied from interface:HttpResponse
Sets a new cookie only if not yet set.- Specified by:
setCookieIfAbsent
in interfaceHttpResponse
- Parameters:
newCookie
- the cookie
-