org.restlet.engine.connector
Class HttpInboundRequest

java.lang.Object
  extended by org.restlet.Message
      extended by org.restlet.Request
          extended by org.restlet.engine.connector.HttpInboundRequest
All Implemented Interfaces:
InboundRequest

public class HttpInboundRequest
extends Request
implements InboundRequest

Request wrapper for server HTTP calls.

Author:
Jerome Louvel

Constructor Summary
HttpInboundRequest(Context context, Connection<Server> connection, String methodName, String resourceUri, String protocol)
          Constructor.
HttpInboundRequest(HttpInboundRequest request)
          Copy constructor.
 
Method Summary
 boolean abort()
           
static void addHeader(Request request, String headerName, String headerValue)
          Adds a new header to the given request.
 void commit(Response response)
           
 List<CacheDirective> getCacheDirectives()
           
 ChallengeResponse getChallengeResponse()
           
 ClientInfo getClientInfo()
          Returns the client-specific information.
 Conditions getConditions()
          Returns the condition data applying to this call.
 Connection<Server> getConnection()
          Returns the related connection.
 Series<Cookie> getCookies()
          Returns the cookies provided by the client.
 Series<Header> getHeaders()
          Returns the headers.
 ChallengeResponse getProxyChallengeResponse()
           
 List<Range> getRanges()
           
 List<RecipientInfo> getRecipientsInfo()
           
 Reference getReferrerRef()
          Returns the referrer reference if available.
 Principal getUserPrincipal()
          Returns the associated user principal.
 List<Warning> getWarnings()
           
 void setChallengeResponse(ChallengeResponse response)
           
 void setHeaders(Series<Header> headers)
          Put the headers in the request's attributes map.
 void setProxyChallengeResponse(ChallengeResponse response)
           
 void setRecipientsInfo(List<RecipientInfo> recipientsInfo)
           
 void setWarnings(List<Warning> warnings)
           
 
Methods inherited from class org.restlet.Request
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, getEntity, getEntityAsText, getOnError, getOnSent, release, setAttributes, setCacheDirectives, setDate, setEntity, setEntity, setOnError, setOnSent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HttpInboundRequest

public HttpInboundRequest(Context context,
                          Connection<Server> connection,
                          String methodName,
                          String resourceUri,
                          String protocol)
Constructor.

Parameters:
context - The context of the parent connector.
connection - The associated network connection.
methodName - The protocol method name.
resourceUri - The target resource URI.
protocol - The protocol name and version.

HttpInboundRequest

public HttpInboundRequest(HttpInboundRequest request)
Copy constructor.

Parameters:
request - The request to copy.
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

commit

public void commit(Response response)
Overrides:
commit 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.

getConnection

public Connection<Server> getConnection()
Returns the related connection.

Specified by:
getConnection in interface InboundRequest
Returns:
The related connection.

getCookies

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

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

getHeaders

public Series<Header> getHeaders()
Description copied from interface: InboundRequest
Returns the headers.

Specified by:
getHeaders in interface InboundRequest
Returns:
The headers.

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.

getUserPrincipal

public Principal getUserPrincipal()
Returns the associated user principal.

Returns:
The associated user principal.

getWarnings

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

setChallengeResponse

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

setHeaders

public void setHeaders(Series<Header> headers)
Description copied from interface: InboundRequest
Put the headers in the request's attributes map.

Specified by:
setHeaders in interface InboundRequest
Parameters:
headers - The headers.

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.