com.noelios.restlet.http
Class StreamServerCall

java.lang.Object
  extended by com.noelios.restlet.http.HttpCall
      extended by com.noelios.restlet.http.HttpServerCall
          extended by com.noelios.restlet.http.StreamServerCall

public class StreamServerCall
extends HttpServerCall

HTTP server call based on streams.

Author:
Jerome Louvel (contact@noelios.com)

Constructor Summary
StreamServerCall(Server server, InputStream requestStream, OutputStream responseStream)
          Constructor.
 
Method Summary
 ReadableByteChannel getRequestChannel()
          Returns the request entity channel if it exists.
 InputStream getRequestStream()
          Returns the request entity stream if it exists.
 WritableByteChannel getResponseChannel()
          Returns the response channel if it exists.
 OutputStream getResponseStream()
          Returns the response stream if it exists.
 void writeResponseHead(Response response)
          Writes the response status line and headers.
 
Methods inherited from class com.noelios.restlet.http.HttpServerCall
getHostDomain, getHostPort, getRequestEntity, readRequestHead, sendResponse, writeResponseBody, writeResponseHead
 
Methods inherited from class com.noelios.restlet.http.HttpCall
formatDate, getClientAddress, getClientPort, getConnectorService, getLogger, getMethod, getProtocol, getReasonPhrase, getRequestHeaders, getRequestUri, getResponseHeaders, getServerAddress, getServerPort, getStatusCode, getVersion, isConfidential, parseDate, setClientAddress, setClientPort, setConfidential, setHostDomain, setHostPort, setLogger, 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

StreamServerCall

public StreamServerCall(Server server,
                        InputStream requestStream,
                        OutputStream responseStream)
Constructor.

Parameters:
server - The server connector.
requestStream - The request input stream.
responseStream - The response output stream.
Method Detail

getRequestChannel

public ReadableByteChannel getRequestChannel()
Description copied from class: HttpServerCall
Returns the request entity channel if it exists.

Specified by:
getRequestChannel in class HttpServerCall
Returns:
The request entity channel if it exists.

getRequestStream

public InputStream getRequestStream()
Description copied from class: HttpServerCall
Returns the request entity stream if it exists.

Specified by:
getRequestStream in class HttpServerCall
Returns:
The request entity stream if it exists.

getResponseChannel

public WritableByteChannel getResponseChannel()
Description copied from class: HttpServerCall
Returns the response channel if it exists.

Specified by:
getResponseChannel in class HttpServerCall
Returns:
The response channel if it exists.

getResponseStream

public OutputStream getResponseStream()
Description copied from class: HttpServerCall
Returns the response stream if it exists.

Specified by:
getResponseStream in class HttpServerCall
Returns:
The response stream if it exists.

writeResponseHead

public void writeResponseHead(Response response)
                       throws IOException
Description copied from class: HttpServerCall
Writes the response status line and headers. Does nothing by default.

Overrides:
writeResponseHead in class HttpServerCall
Parameters:
response - The response.
Throws:
IOException


Copyright © 2005-2007 Noelios Technologies.