org.restlet.engine.http.connector
Class ConnectedRequest

java.lang.Object
  extended by org.restlet.Message
      extended by org.restlet.Request
          extended by org.restlet.engine.http.connector.ConnectedRequest

public class ConnectedRequest
extends Request

Request wrapper for server HTTP calls.

Author:
Jerome Louvel

Constructor Summary
ConnectedRequest(ConnectedRequest request)
          Copy constructor.
ConnectedRequest(Context context, ServerConnection connection, Method method, String resourceUri, String version, Series<Parameter> headers, Representation entity, boolean confidential, Principal userPrincipal)
          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.
protected  ServerConnection getConnection()
           
 Series<Cookie> getCookies()
          Returns the cookies provided by the client.
 Series<Parameter> getHeaders()
          Returns the HTTP headers.
 ChallengeResponse getProxyChallengeResponse()
           
 List<Range> getRanges()
           
 List<RecipientInfo> getRecipientsInfo()
           
 Reference getReferrerRef()
          Returns the referrer reference if available.
 Principal getUserPrincipal()
           
 List<Warning> getWarnings()
           
 void setChallengeResponse(ChallengeResponse response)
           
 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, isConfidential, isEntityAvailable, isExpectingResponse, setClientInfo, setConditions, setCookies, setHostRef, setHostRef, setMaxForwards, setMethod, setOnResponse, setOriginalRef, setProtocol, setRanges, setReferrerRef, setReferrerRef, setResourceRef, setResourceRef, setRootRef, toString
 
Methods inherited from class org.restlet.Message
getAttributes, getDate, getEntity, getEntityAsForm, getEntityAsText, getOnSent, release, setAttributes, setCacheDirectives, setDate, setEntity, setEntity, setOnSent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConnectedRequest

public ConnectedRequest(ConnectedRequest request)
Copy constructor.

Parameters:
request - The request to copy.

ConnectedRequest

public ConnectedRequest(Context context,
                        ServerConnection connection,
                        Method method,
                        String resourceUri,
                        String version,
                        Series<Parameter> headers,
                        Representation entity,
                        boolean confidential,
                        Principal userPrincipal)
Constructor.

Parameters:
context - The context of the parent connector.
connection - The associated network connection.
method - The protocol method.
resourceUri - The target resource URI.
version - The protocol version.
headers - The request headers.
entity - The request entity.
confidential - True if received confidentially.
userPrincipal - The user principal.
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

protected ServerConnection getConnection()

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<Parameter> getHeaders()
Returns the HTTP headers.

Returns:
The HTTP 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()

getWarnings

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

setChallengeResponse

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

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-2011 Noelios Technologies.