com.noelios.restlet.ext.jetty
Class JettyCall

java.lang.Object
  extended by com.noelios.restlet.http.HttpCall
      extended by com.noelios.restlet.http.HttpServerCall
          extended by com.noelios.restlet.ext.jetty.JettyCall

public class JettyCall
extends HttpServerCall

Call that is used by the Jetty 6 HTTP server connector.

Author:
Jerome Louvel (contact@noelios.com)

Constructor Summary
JettyCall(Server server, HttpConnection connection)
          Constructor.
 
Method Summary
 String getClientAddress()
           
 int getClientPort()
           
 HttpConnection getConnection()
          Returns the wrapped Jetty HTTP connection.
 String getMethod()
          Returns the request method.
 ReadableByteChannel getRequestChannel()
          Returns the request entity channel if it exists.
 Series<Parameter> getRequestHeaders()
          Returns the list of request headers.
 InputStream getRequestStream()
          Returns the request entity stream if it exists.
 String getRequestUri()
          Returns the URI on the request line (most like a relative reference, but not necessarily).
 WritableByteChannel getResponseChannel()
          Returns the response channel if it exists.
 OutputStream getResponseStream()
          Returns the response stream if it exists.
 String getServerAddress()
          Returns the response address.
Corresponds to the IP address of the responding server.
 boolean isConfidential()
          Indicates if the request was made using a confidential mean.
 void sendResponse(Response response)
           
 
Methods inherited from class com.noelios.restlet.http.HttpServerCall
getHostDomain, getHostPort, getRequestEntity, readRequestHead, writeResponseBody, writeResponseHead, writeResponseHead
 
Methods inherited from class com.noelios.restlet.http.HttpCall
formatDate, getConnectorService, getLogger, getProtocol, getReasonPhrase, getResponseHeaders, getServerPort, getStatusCode, getVersion, 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

JettyCall

public JettyCall(Server server,
                 HttpConnection connection)
Constructor.

Parameters:
server - The parent server.
connection - The wrapped Jetty HTTP connection.
Method Detail

getClientAddress

public String getClientAddress()
Overrides:
getClientAddress in class HttpCall

getClientPort

public int getClientPort()
Overrides:
getClientPort in class HttpCall

getConnection

public HttpConnection getConnection()
Returns the wrapped Jetty HTTP connection.

Returns:
The wrapped Jetty HTTP connection.

getMethod

public String getMethod()
Returns the request method.

Overrides:
getMethod in class HttpCall
Returns:
The request method.

getRequestChannel

public ReadableByteChannel getRequestChannel()
Returns the request entity channel if it exists.

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

getRequestHeaders

public Series<Parameter> getRequestHeaders()
Returns the list of request headers.

Overrides:
getRequestHeaders in class HttpCall
Returns:
The list of request headers.

getRequestStream

public InputStream getRequestStream()
Returns the request entity stream if it exists.

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

getRequestUri

public String getRequestUri()
Returns the URI on the request line (most like a relative reference, but not necessarily).

Overrides:
getRequestUri in class HttpCall
Returns:
The URI on the request line.

getResponseChannel

public WritableByteChannel getResponseChannel()
Returns the response channel if it exists.

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

getResponseStream

public OutputStream getResponseStream()
Returns the response stream if it exists.

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

getServerAddress

public String getServerAddress()
Returns the response address.
Corresponds to the IP address of the responding server.

Overrides:
getServerAddress in class HttpCall
Returns:
The response address.

isConfidential

public boolean isConfidential()
Indicates if the request was made using a confidential mean.

Overrides:
isConfidential in class HttpCall
Returns:
True if the request was made using a confidential mean.

sendResponse

public void sendResponse(Response response)
                  throws IOException
Overrides:
sendResponse in class HttpServerCall
Throws:
IOException


Copyright © 2005-2007 Noelios Consulting.