|
||||||||||
| 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 | |
|---|---|
Socket |
createSocket(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(InputStream stream)
Returns the representation wrapping the given stream. |
WritableByteChannel |
getRequestEntityChannel()
Returns the request entity channel if it exists. |
OutputStream |
getRequestEntityStream()
Returns the request entity stream if it exists. |
OutputStream |
getRequestHeadStream()
Returns the request head stream if it exists. |
ReadableByteChannel |
getResponseEntityChannel(long size)
Returns the response channel if it exists. |
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 Socket createSocket(String hostDomain,
int hostPort)
throws UnknownHostException,
IOException
hostDomain - The target host domain name.hostPort - The target host port.
UnknownHostException
IOExceptionpublic StreamClientHelper getHelper()
HttpClientCall
getHelper in class HttpClientCallprotected Representation getRepresentation(InputStream stream)
HttpClientCall
getRepresentation in class HttpClientCallstream - The response input stream.
public WritableByteChannel getRequestEntityChannel()
HttpClientCall
getRequestEntityChannel in class HttpClientCallpublic OutputStream getRequestEntityStream()
HttpClientCall
getRequestEntityStream in class HttpClientCallpublic OutputStream getRequestHeadStream()
HttpClientCall
getRequestHeadStream in class HttpClientCallpublic ReadableByteChannel getResponseEntityChannel(long size)
HttpClientCall
getResponseEntityChannel in class HttpClientCallsize - The expected entity size or -1 if unknown.
public InputStream getResponseEntityStream(long size)
HttpClientCall
getResponseEntityStream in class HttpClientCallsize - The expected entity size or -1 if unknown.
protected boolean isClientKeepAlive()
HttpCall
isClientKeepAlive in class HttpClientCall
protected void parseResponse()
throws IOException
IOExceptionpublic Status sendRequest(Request request)
HttpClientCall
sendRequest in class HttpClientCallrequest - The high-level request.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||