public abstract class InfinispanResponse extends Object
Modifier | Constructor and Description |
---|---|
protected |
InfinispanResponse(Optional<InfinispanRequest> request) |
Modifier and Type | Method and Description |
---|---|
protected void |
addSpecificHeaders(io.netty.handler.codec.http.FullHttpResponse response) |
void |
authenticate(String authenticateHeader)
Adds
www-authenticate header. |
void |
charset(Charset charset)
Adds a charset.
|
void |
contentAsBytes(byte[] content)
Adds content as binary array.
|
void |
contentAsText(String content)
Adds content as text.
|
void |
contentType(String contentType)
Adds
Content-Type header. |
void |
httpVersion(io.netty.handler.codec.http.HttpVersion httpVersion)
Adds HTTP version header.
|
boolean |
isKeepAlive()
Checks whether this is a Keep Alive type of response.
|
void |
status(io.netty.handler.codec.http.HttpResponseStatus httpStatus)
Adds status code.
|
io.netty.handler.codec.http.FullHttpResponse |
toNettyHttpResponse()
Renders
FullHttpResponse object. |
protected InfinispanResponse(Optional<InfinispanRequest> request)
public void contentAsText(String content)
UTF-8
.content
- Content.public void contentAsBytes(byte[] content)
content
- Content.public void contentType(String contentType)
Content-Type
header.contentType
- Content-Type
header.public void httpVersion(io.netty.handler.codec.http.HttpVersion httpVersion)
httpVersion
- HTTP version header.public void status(io.netty.handler.codec.http.HttpResponseStatus httpStatus)
httpStatus
- Status code.public boolean isKeepAlive()
true
if the response contains Keep Alive headers.protected void addSpecificHeaders(io.netty.handler.codec.http.FullHttpResponse response)
public io.netty.handler.codec.http.FullHttpResponse toNettyHttpResponse()
FullHttpResponse
object.FullHttpResponse
object based on this InfinispanResponse
.public void authenticate(String authenticateHeader)
www-authenticate
header.authenticateHeader
- www-authenticate
header value.public void charset(Charset charset)
charset
- charset value.Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.