org.restlet.engine.adapter
Class HttpRequest

java.lang.Object
  extended by org.restlet.Message
      extended by org.restlet.Request
          extended by org.restlet.engine.adapter.HttpRequest

public class HttpRequest
extends Request

Request wrapper for server HTTP calls.

Author:
Jerome Louvel

Constructor Summary
HttpRequest(Context context, ServerCall httpCall)
          Constructor.
 
Method Summary
 boolean abort()
           
static void addHeader(Request request, String headerName, String headerValue)
          Adds a new header to the given request.
 List<CacheDirective> getCacheDirectives()
           
 ChallengeResponse getChallengeResponse()
           
 ClientInfo getClientInfo()
          Returns the client-specific information.
 Conditions getConditions()
          Returns the condition data applying to this call.
 Series<Cookie> getCookies()
          Returns the cookies provided by the client.
 Representation getEntity()
          Returns the representation provided by the client.
 Series<Header> getHeaders()
          Returns the HTTP headers.
 ServerCall getHttpCall()
          Returns the low-level HTTP call.
 ChallengeResponse getProxyChallengeResponse()
           
 List<Range> getRanges()
           
 List<RecipientInfo> getRecipientsInfo()
           
 Reference getReferrerRef()
          Returns the referrer reference if available.
 List<Warning> getWarnings()
           
 void setChallengeResponse(ChallengeResponse response)
           
 void setEntity(Representation entity)
           
 void setProxyChallengeResponse(ChallengeResponse response)
           
 void setRecipientsInfo(List<RecipientInfo> recipientsInfo)
           
 void setWarnings(List<Warning> warnings)
           
 
Methods inherited from class org.restlet.Request
commit, getCurrent, getHostRef, getMaxForwards, getMethod, getOnResponse, getOriginalRef, getProtocol, getResourceRef, getRootRef, isAsynchronous, isConfidential, isEntityAvailable, isExpectingResponse, isLoggable, isSynchronous, setClientInfo, setConditions, setCookies, setHostRef, setHostRef, setLoggable, setMaxForwards, setMethod, setOnResponse, setOriginalRef, setProtocol, setRanges, setReferrerRef, setReferrerRef, setResourceRef, setResourceRef, setRootRef, toString
 
Methods inherited from class org.restlet.Message
getAttributes, getDate, getEntityAsText, getOnError, getOnSent, release, setAttributes, setCacheDirectives, setDate, setEntity, setOnError, setOnSent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HttpRequest

public HttpRequest(Context context,
                   ServerCall httpCall)
Constructor.

Parameters:
context - The context of the HTTP server connector that issued the call.
httpCall - The low-level HTTP server call.
Method Detail

addHeader

public static void addHeader(Request request,
                             String headerName,
                             String headerValue)
Adds a new header to the given request.

Parameters:
request - The request to update.
headerName - The header name to add.
headerValue - The header value to add.

abort

public boolean abort()
Overrides:
abort in class Request

getCacheDirectives

public List<CacheDirective> getCacheDirectives()
Overrides:
getCacheDirectives in class Message

getChallengeResponse

public ChallengeResponse getChallengeResponse()
Overrides:
getChallengeResponse in class Request

getClientInfo

public ClientInfo getClientInfo()
Returns the client-specific information.

Overrides:
getClientInfo in class Request
Returns:
The client-specific information.

getConditions

public Conditions getConditions()
Returns the condition data applying to this call.

Overrides:
getConditions in class Request
Returns:
The condition data applying to this call.

getCookies

public Series<Cookie> getCookies()
Returns the cookies provided by the client.

Overrides:
getCookies in class Request
Returns:
The cookies provided by the client.

getEntity

public Representation getEntity()
Returns the representation provided by the client.

Overrides:
getEntity in class Message
Returns:
The representation provided by the client.

getHeaders

public Series<Header> getHeaders()
Returns the HTTP headers.

Returns:
The HTTP headers.

getHttpCall

public ServerCall getHttpCall()
Returns the low-level HTTP call.

Returns:
The low-level HTTP call.

getProxyChallengeResponse

public ChallengeResponse getProxyChallengeResponse()
Overrides:
getProxyChallengeResponse in class Request

getRanges

public List<Range> getRanges()
Overrides:
getRanges in class Request

getRecipientsInfo

public List<RecipientInfo> getRecipientsInfo()
Overrides:
getRecipientsInfo in class Message

getReferrerRef

public Reference getReferrerRef()
Returns the referrer reference if available.

Overrides:
getReferrerRef in class Request
Returns:
The referrer reference.

getWarnings

public List<Warning> getWarnings()
Overrides:
getWarnings in class Message

setChallengeResponse

public void setChallengeResponse(ChallengeResponse response)
Overrides:
setChallengeResponse in class Request

setEntity

public void setEntity(Representation entity)
Overrides:
setEntity in class Message

setProxyChallengeResponse

public void setProxyChallengeResponse(ChallengeResponse response)
Overrides:
setProxyChallengeResponse in class Request

setRecipientsInfo

public void setRecipientsInfo(List<RecipientInfo> recipientsInfo)
Overrides:
setRecipientsInfo in class Message

setWarnings

public void setWarnings(List<Warning> warnings)
Overrides:
setWarnings in class Message


Copyright © 2005-2013 Restlet.