public class HttpExchangeCall extends ServerCall
| Constructor and Description |
|---|
HttpExchangeCall(Server server,
com.sun.net.httpserver.HttpExchange exchange)
Constructor.
|
HttpExchangeCall(Server server,
com.sun.net.httpserver.HttpExchange exchange,
boolean confidential)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
abort()
Ask the connector to abort the related network connection, for example
immediately closing the socket.
|
void |
flushBuffers()
Flushes the buffers onto the network so that for example you can force
headers to be written before the entity is becoming available.
|
java.lang.String |
getClientAddress()
Returns the client address.
Corresponds to the IP address of the requesting client. |
int |
getClientPort()
Returns the client port.
Corresponds to the TCP/IP port of the requesting client. |
java.lang.String |
getMethod()
Returns the request method.
|
java.io.InputStream |
getRequestEntityStream(long size)
Returns the request entity stream if it exists.
|
Series<Header> |
getRequestHeaders()
Returns the modifiable list of request headers.
|
java.io.InputStream |
getRequestHeadStream()
Returns the request head stream if it exists.
|
java.lang.String |
getRequestUri()
Returns the URI on the request line (most like a relative reference, but
not necessarily).
|
java.io.OutputStream |
getResponseEntityStream()
Returns the response entity stream if it exists.
|
void |
writeResponseHead(Response restletResponse)
Writes the response status line and headers.
|
complete, getCertificates, getCipherSuite, getContentLength, getHostDomain, getHostPort, getRequestEntity, getSslKeySize, getSslSessionId, getSslSessionIdBytes, isClientKeepAlive, isServerKeepAlive, readRequestHead, sendResponse, shouldResponseBeChunked, writeResponseBody, writeResponseHeadgetLogger, getProtocol, getReasonPhrase, getRepresentation, getRepresentation, getResponseHeaders, getServerAddress, getServerPort, getStatusCode, getUserPrincipal, getVersion, isBroken, isConfidential, isConnectionBroken, isKeepAlive, isRequestChunked, isResponseChunked, setClientAddress, setClientPort, setConfidential, setHostDomain, setHostPort, setMethod, setProtocol, setReasonPhrase, setRequestUri, setServerAddress, setServerPort, setStatusCode, setUserPrincipal, setVersionpublic HttpExchangeCall(Server server, com.sun.net.httpserver.HttpExchange exchange)
server - exchange - public HttpExchangeCall(Server server, com.sun.net.httpserver.HttpExchange exchange, boolean confidential)
server - exchange - confidential - public boolean abort()
ServerCallabort in class ServerCallpublic void flushBuffers()
throws java.io.IOException
ServerCallflushBuffers in class ServerCalljava.io.IOExceptionpublic java.lang.String getClientAddress()
CallgetClientAddress in class Callpublic int getClientPort()
CallgetClientPort in class Callpublic java.lang.String getMethod()
Callpublic Series<Header> getRequestHeaders()
CallgetRequestHeaders in class Callpublic java.io.InputStream getRequestEntityStream(long size)
ServerCallgetRequestEntityStream in class ServerCallsize - The expected entity size or -1 if unknown.public java.io.InputStream getRequestHeadStream()
ServerCallgetRequestHeadStream in class ServerCallpublic java.lang.String getRequestUri()
CallgetRequestUri in class Callpublic java.io.OutputStream getResponseEntityStream()
ServerCallgetResponseEntityStream in class ServerCallpublic void writeResponseHead(Response restletResponse) throws java.io.IOException
ServerCallwriteResponseHead in class ServerCallrestletResponse - The response.java.io.IOExceptionCopyright © 2005-2018 Restlet.