public class ConnectedRequest extends Request
| Constructor and Description |
|---|
ConnectedRequest(ConnectedRequest request)
Copy constructor.
|
ConnectedRequest(Context context,
ServerConnection connection,
Method method,
java.lang.String resourceUri,
java.lang.String version,
Series<Parameter> headers,
Representation entity,
boolean confidential,
java.security.Principal userPrincipal)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
abort()
Ask the connector to attempt to abort the related network connection, for
example immediately closing the socket.
|
static void |
addHeader(Request request,
java.lang.String headerName,
java.lang.String headerValue)
Adds a new header to the given request.
|
void |
commit(Response response)
Asks the server connector to immediately commit the given response
associated to this request, making it ready to be sent back to the
client.
|
java.util.List<CacheDirective> |
getCacheDirectives()
Returns the cache directives.
Note that when used with HTTP connectors, this property maps to the "Cache-Control" header. |
ChallengeResponse |
getChallengeResponse()
Returns the authentication response sent by a client to an origin server.
|
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()
Returns the authentication response sent by a client to a proxy.
|
java.util.List<Range> |
getRanges()
Returns the ranges to return from the target resource's representation.
|
java.util.List<RecipientInfo> |
getRecipientsInfo()
Returns the intermediary recipient information.
Note that when used with HTTP connectors, this property maps to the "Via" headers. |
Reference |
getReferrerRef()
Returns the referrer reference if available.
|
java.security.Principal |
getUserPrincipal() |
java.util.List<Warning> |
getWarnings()
Returns the additional warnings information.
Note that when used with HTTP connectors, this property maps to the "Warning" headers. |
void |
setChallengeResponse(ChallengeResponse response)
Sets the authentication response sent by a client to an origin server.
|
void |
setProxyChallengeResponse(ChallengeResponse response)
Sets the authentication response sent by a client to a proxy.
|
void |
setRecipientsInfo(java.util.List<RecipientInfo> recipientsInfo)
Sets the modifiable list of intermediary recipients.
|
void |
setWarnings(java.util.List<Warning> warnings)
Sets the additional warnings information.
|
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, toStringgetAttributes, getDate, getEntity, getEntityAsForm, getEntityAsText, getOnSent, release, setAttributes, setCacheDirectives, setDate, setEntity, setEntity, setOnSentpublic ConnectedRequest(ConnectedRequest request)
request - The request to copy.public ConnectedRequest(Context context, ServerConnection connection, Method method, java.lang.String resourceUri, java.lang.String version, Series<Parameter> headers, Representation entity, boolean confidential, java.security.Principal userPrincipal)
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.public static void addHeader(Request request, java.lang.String headerName, java.lang.String headerValue)
request - The request to update.headerName - The header name to add.headerValue - The header value to add.public boolean abort()
Requestpublic void commit(Response response)
Requestpublic java.util.List<CacheDirective> getCacheDirectives()
MessagegetCacheDirectives in class Messagepublic ChallengeResponse getChallengeResponse()
RequestgetChallengeResponse in class Requestpublic ClientInfo getClientInfo()
getClientInfo in class Requestpublic Conditions getConditions()
getConditions in class Requestprotected ServerConnection getConnection()
public Series<Cookie> getCookies()
getCookies in class Requestpublic Series<Parameter> getHeaders()
public ChallengeResponse getProxyChallengeResponse()
RequestgetProxyChallengeResponse in class Requestpublic java.util.List<Range> getRanges()
Requestpublic java.util.List<RecipientInfo> getRecipientsInfo()
MessagegetRecipientsInfo in class Messagepublic Reference getReferrerRef()
getReferrerRef in class Requestpublic java.security.Principal getUserPrincipal()
public java.util.List<Warning> getWarnings()
MessagegetWarnings in class Messagepublic void setChallengeResponse(ChallengeResponse response)
RequestsetChallengeResponse in class Requestresponse - The authentication response sent by a client to an origin
server.public void setProxyChallengeResponse(ChallengeResponse response)
RequestsetProxyChallengeResponse in class Requestresponse - The authentication response sent by a client to a proxy.public void setRecipientsInfo(java.util.List<RecipientInfo> recipientsInfo)
MessagesetRecipientsInfo in class MessagerecipientsInfo - A list of intermediary recipients.public void setWarnings(java.util.List<Warning> warnings)
MessagesetWarnings in class Messagewarnings - The warnings.Copyright © 2005-2012. All Rights Reserved.