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, writeResponseHead
getLogger, 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, setVersion
public 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()
ServerCall
abort
in class ServerCall
public void flushBuffers() throws java.io.IOException
ServerCall
flushBuffers
in class ServerCall
java.io.IOException
public java.lang.String getClientAddress()
Call
getClientAddress
in class Call
public int getClientPort()
Call
getClientPort
in class Call
public java.lang.String getMethod()
Call
public Series<Header> getRequestHeaders()
Call
getRequestHeaders
in class Call
public java.io.InputStream getRequestEntityStream(long size)
ServerCall
getRequestEntityStream
in class ServerCall
size
- The expected entity size or -1 if unknown.public java.io.InputStream getRequestHeadStream()
ServerCall
getRequestHeadStream
in class ServerCall
public java.lang.String getRequestUri()
Call
getRequestUri
in class Call
public java.io.OutputStream getResponseEntityStream()
ServerCall
getResponseEntityStream
in class ServerCall
public void writeResponseHead(Response restletResponse) throws java.io.IOException
ServerCall
writeResponseHead
in class ServerCall
restletResponse
- The response.java.io.IOException
Copyright © 2005-2020 Restlet.