public class PlayServerHttpExchange extends AbstractServerHttpExchange
ServerHttpExchange for Play 2.bodyActions, closeActions| Constructor and Description |
|---|
PlayServerHttpExchange(play.mvc.Http.Request request,
play.mvc.Http.Response response) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doClose() |
protected void |
doSetHeader(String name,
String value) |
protected void |
doSetStatus(HttpStatus status) |
protected void |
doWrite(ByteBuffer byteBuffer) |
protected void |
doWrite(String data) |
Set<String> |
headerNames()
The names of the request headers.
|
List<String> |
headers(String name)
Returns the request headers associated with the given name or empty list
if no header is found.
|
String |
method()
The name of the request method.
|
protected void |
readBody() |
play.libs.F.Promise<play.mvc.Result> |
result() |
<T> T |
unwrap(Class<T> clazz)
Http.Request and Http.Response are available. |
String |
uri()
The request URI used to connect.
|
bodyAction, close, close, close, closeAction, header, setHeader, setHeader, setStatus, write, writepublic PlayServerHttpExchange(play.mvc.Http.Request request,
play.mvc.Http.Response response)
public play.libs.F.Promise<play.mvc.Result> result()
public String uri()
ServerHttpExchangepublic String method()
ServerHttpExchangepublic Set<String> headerNames()
ServerHttpExchangeSet is case-sensitive. When iterating the set unlike getting the
header value, you should make it lower-case or upper-case and use it.public List<String> headers(String name)
ServerHttpExchangeprotected void readBody()
readBody in class AbstractServerHttpExchangeprotected void doSetStatus(HttpStatus status)
doSetStatus in class AbstractServerHttpExchangeprotected void doSetHeader(String name, String value)
doSetHeader in class AbstractServerHttpExchangeprotected void doWrite(ByteBuffer byteBuffer)
doWrite in class AbstractServerHttpExchangeprotected void doWrite(String data)
doWrite in class AbstractServerHttpExchangeprotected void doClose()
doClose in class AbstractServerHttpExchangepublic <T> T unwrap(Class<T> clazz)
Http.Request and Http.Response are available.Copyright 2014, The Vibe Project