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.
|
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. |
String |
getMethod()
Returns the request method.
|
InputStream |
getRequestEntityStream(long size)
Returns the request entity stream if it exists.
|
Series<Header> |
getRequestHeaders()
Returns the modifiable list of request headers.
|
InputStream |
getRequestHeadStream()
Returns the request head stream if it exists.
|
String |
getRequestUri()
Returns the URI on the request line (most like a relative reference, but not
necessarily).
|
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 - The parent server.exchange - The wrapped HttpExchange instance.public HttpExchangeCall(Server server, com.sun.net.httpserver.HttpExchange exchange, boolean confidential)
server - The parent server.exchange - The wrapped HttpExchange instance.confidential - True if the confidentiality of the call is ensured (ex:
via SSL)public boolean abort()
ServerCallabort in class ServerCallpublic void flushBuffers()
throws IOException
ServerCallflushBuffers in class ServerCallIOExceptionpublic String getClientAddress()
CallgetClientAddress in class Callpublic int getClientPort()
CallgetClientPort in class Callpublic Series<Header> getRequestHeaders()
CallgetRequestHeaders in class Callpublic InputStream getRequestEntityStream(long size)
ServerCallgetRequestEntityStream in class ServerCallsize - The expected entity size or -1 if unknown.public InputStream getRequestHeadStream()
ServerCallgetRequestHeadStream in class ServerCallpublic String getRequestUri()
CallgetRequestUri in class Callpublic OutputStream getResponseEntityStream()
ServerCallgetResponseEntityStream in class ServerCallpublic void writeResponseHead(Response restletResponse) throws IOException
ServerCallwriteResponseHead in class ServerCallrestletResponse - The response.IOExceptionCopyright © 2005–2025. All rights reserved.