|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.noelios.restlet.http.HttpCall
com.noelios.restlet.http.HttpClientCall
com.noelios.restlet.http.StreamClientCall
public class StreamClientCall
HTTP client call based on streams.
Constructor Summary | |
---|---|
StreamClientCall(StreamClientHelper helper,
Request request)
Constructor. |
Method Summary | |
---|---|
java.net.Socket |
createSocket(java.lang.String hostDomain,
int hostPort)
Creates the socket that will be used to send the request and get the response. |
StreamClientHelper |
getHelper()
Returns the HTTP client helper. |
protected Representation |
getRepresentation(java.io.InputStream stream)
Returns the representation wrapping the given stream. |
java.nio.channels.WritableByteChannel |
getRequestEntityChannel()
Returns the request entity channel if it exists. |
java.io.OutputStream |
getRequestEntityStream()
Returns the request entity stream if it exists. |
java.io.OutputStream |
getRequestHeadStream()
Returns the request head stream if it exists. |
java.nio.channels.ReadableByteChannel |
getResponseEntityChannel(long size)
Returns the response channel if it exists. |
java.io.InputStream |
getResponseEntityStream(long size)
Returns the response entity stream if it exists. |
protected boolean |
isClientKeepAlive()
Indicates if the client wants a persistent connection. |
protected void |
parseResponse()
Parses the HTTP response. |
Status |
sendRequest(Request request)
Sends the request to the client. |
Methods inherited from class com.noelios.restlet.http.HttpClientCall |
---|
copyResponseEntityHeaders, getContentLength, getLocalAddress, getRepresentation, getResponseEntity, isServerKeepAlive, parseContentDisposition, shouldRequestBeChunked |
Methods inherited from class com.noelios.restlet.http.HttpCall |
---|
formatDate, getClientAddress, getClientPort, getConnectorService, getContentLength, getHostDomain, getHostPort, getLogger, getMethod, getProtocol, getReasonPhrase, getRequestHeaders, getRequestUri, getResponseHeaders, getServerAddress, getServerPort, getStatusCode, getVersion, isConfidential, isConnectionBroken, isKeepAlive, isRequestChunked, isResponseChunked, parseDate, setClientAddress, setClientPort, setConfidential, setHostDomain, setHostPort, setMethod, setProtocol, setReasonPhrase, setRequestUri, setServerAddress, setServerPort, setStatusCode, setVersion |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StreamClientCall(StreamClientHelper helper, Request request)
helper
- The client connector helper.request
- The request to send.Method Detail |
---|
public java.net.Socket createSocket(java.lang.String hostDomain, int hostPort) throws java.net.UnknownHostException, java.io.IOException
hostDomain
- The target host domain name.hostPort
- The target host port.
java.net.UnknownHostException
java.io.IOException
public StreamClientHelper getHelper()
HttpClientCall
getHelper
in class HttpClientCall
protected Representation getRepresentation(java.io.InputStream stream)
HttpClientCall
getRepresentation
in class HttpClientCall
stream
- The response input stream.
public java.nio.channels.WritableByteChannel getRequestEntityChannel()
HttpClientCall
getRequestEntityChannel
in class HttpClientCall
public java.io.OutputStream getRequestEntityStream()
HttpClientCall
getRequestEntityStream
in class HttpClientCall
public java.io.OutputStream getRequestHeadStream()
HttpClientCall
getRequestHeadStream
in class HttpClientCall
public java.nio.channels.ReadableByteChannel getResponseEntityChannel(long size)
HttpClientCall
getResponseEntityChannel
in class HttpClientCall
size
- The expected entity size or -1 if unknown.
public java.io.InputStream getResponseEntityStream(long size)
HttpClientCall
getResponseEntityStream
in class HttpClientCall
size
- The expected entity size or -1 if unknown.
protected boolean isClientKeepAlive()
HttpCall
isClientKeepAlive
in class HttpClientCall
protected void parseResponse() throws java.io.IOException
java.io.IOException
public Status sendRequest(Request request)
HttpClientCall
sendRequest
in class HttpClientCall
request
- The high-level request.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |