Class HttpInboundRequest
- java.lang.Object
-
- org.restlet.Message
-
- org.restlet.Request
-
- org.restlet.ext.nio.internal.request.HttpInboundRequest
-
- All Implemented Interfaces:
InboundRequest
- Direct Known Subclasses:
HttpsInboundRequest
@Deprecated public class HttpInboundRequest extends Request implements InboundRequest
Deprecated.Will be removed to favor lower-level network extensions allowing more control at the Restlet API level.Request wrapper for server HTTP calls.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanaccessControlRequestHeadersAddedDeprecated.Indicates if the access control data for request headers was parsed and added.private booleanaccessControlRequestMethodAddedDeprecated.Indicates if the access control data for request method was parsed and addedprivate booleancacheDirectivesAddedDeprecated.Indicates if the cache control data was parsed and added.private booleanclientAddedDeprecated.Indicates if the client data was parsed and added.private booleanconditionAddedDeprecated.Indicates if the conditions were parsed and added.private Connection<Server>connectionDeprecated.The parent network connection.private ContextcontextDeprecated.The context of the parent connector.private booleancookiesAddedDeprecated.Indicates if the cookies were parsed and added.private java.lang.StringprotocolDeprecated.The protocol name and version.private booleanproxySecurityAddedDeprecated.Indicates if the proxy security data was parsed and added.private booleanrangesAddedDeprecated.Indicates if the ranges data was parsed and added.private booleanrecipientsInfoAddedDeprecated.Indicates if the recipients info was parsed and added.private booleanreferrerAddedDeprecated.Indicates if the referrer was parsed and added.private java.lang.StringresourceUriDeprecated.The target resource URI.private booleansecurityAddedDeprecated.Indicates if the security data was parsed and added.private java.security.PrincipaluserPrincipalDeprecated.The user principal.private booleanwarningsAddedDeprecated.Indicates if the warning data was parsed and added.
-
Constructor Summary
Constructors Constructor Description HttpInboundRequest(Context context, Connection<Server> connection, java.lang.String methodName, java.lang.String resourceUri, java.lang.String protocol)Deprecated.Constructor.HttpInboundRequest(HttpInboundRequest request)Deprecated.Copy constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanabort()Deprecated.Ask the connector to attempt to abort the related network connection, for example immediately closing the socket.static voidaddHeader(Request request, java.lang.String headerName, java.lang.String headerValue)Deprecated.Adds a new header to the given request.voidcommit(Response response)Deprecated.Asks the server connector to immediately commit the given response associated to this request, making it ready to be sent back to the client.voidflushBuffers()Deprecated.Asks the underlying connector to immediately flush the network buffers.java.util.Set<java.lang.String>getAccessControlRequestHeaders()Deprecated.Returns the modifiable set of headers the client is willing to send in future request to this resource.MethodgetAccessControlRequestMethod()Deprecated.Returns the method the client is willing to use in future request to this resource.java.util.List<CacheDirective>getCacheDirectives()Deprecated.Returns the cache directives.
Note that when used with HTTP connectors, this property maps to the "Cache-Control" header.ChallengeResponsegetChallengeResponse()Deprecated.Returns the authentication response sent by a client to an origin server.ClientInfogetClientInfo()Deprecated.Returns the client-specific information.ConditionsgetConditions()Deprecated.Returns the condition data applying to this call.Connection<Server>getConnection()Deprecated.Returns the related connection.Series<Cookie>getCookies()Deprecated.Returns the cookies provided by the client.Series<Header>getHeaders()Deprecated.Returns the series of lower-level HTTP headers.ChallengeResponsegetProxyChallengeResponse()Deprecated.Returns the authentication response sent by a client to a proxy.java.util.List<Range>getRanges()Deprecated.Returns the ranges to return from the target resource's representation.java.util.List<RecipientInfo>getRecipientsInfo()Deprecated.Returns the intermediary recipient information.
Note that when used with HTTP connectors, this property maps to the "Via" headers.ReferencegetReferrerRef()Deprecated.Returns the referrer reference if available.java.security.PrincipalgetUserPrincipal()Deprecated.Returns the associated user principal.java.util.List<Warning>getWarnings()Deprecated.Returns the additional warnings information.
Note that when used with HTTP connectors, this property maps to the "Warning" headers.voidsetAccessControlRequestHeaders(java.util.Set<java.lang.String> accessControlRequestHeaders)Deprecated.Sets the set of headers the client is willing to use in future request to this resource.voidsetAccessControlRequestMethod(Method accessControlRequestMethod)Deprecated.Sets the method the client is willing to use in future request to this resource.voidsetChallengeResponse(ChallengeResponse response)Deprecated.Sets the authentication response sent by a client to an origin server.voidsetHeaders(Series<Header> headers)Deprecated.Put the headers in the request's attributes map.voidsetProxyChallengeResponse(ChallengeResponse response)Deprecated.Sets the authentication response sent by a client to a proxy.voidsetRecipientsInfo(java.util.List<RecipientInfo> recipientsInfo)Deprecated.Sets the modifiable list of intermediary recipients.voidsetWarnings(java.util.List<Warning> warnings)Deprecated.Sets the additional warnings information.-
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
bufferEntity, getAttributes, getDate, getEntity, getEntityAsText, getOnError, getOnSent, release, setAttributes, setCacheDirectives, setDate, setEntity, setEntity, setOnError, setOnSent
-
-
-
-
Field Detail
-
accessControlRequestHeadersAdded
private volatile boolean accessControlRequestHeadersAdded
Deprecated.Indicates if the access control data for request headers was parsed and added.
-
accessControlRequestMethodAdded
private volatile boolean accessControlRequestMethodAdded
Deprecated.Indicates if the access control data for request method was parsed and added
-
cacheDirectivesAdded
private volatile boolean cacheDirectivesAdded
Deprecated.Indicates if the cache control data was parsed and added.
-
clientAdded
private volatile boolean clientAdded
Deprecated.Indicates if the client data was parsed and added.
-
conditionAdded
private volatile boolean conditionAdded
Deprecated.Indicates if the conditions were parsed and added.
-
connection
private final Connection<Server> connection
Deprecated.The parent network connection.
-
context
private final Context context
Deprecated.The context of the parent connector.
-
cookiesAdded
private volatile boolean cookiesAdded
Deprecated.Indicates if the cookies were parsed and added.
-
protocol
private volatile java.lang.String protocol
Deprecated.The protocol name and version.
-
proxySecurityAdded
private volatile boolean proxySecurityAdded
Deprecated.Indicates if the proxy security data was parsed and added.
-
rangesAdded
private volatile boolean rangesAdded
Deprecated.Indicates if the ranges data was parsed and added.
-
recipientsInfoAdded
private volatile boolean recipientsInfoAdded
Deprecated.Indicates if the recipients info was parsed and added.
-
referrerAdded
private volatile boolean referrerAdded
Deprecated.Indicates if the referrer was parsed and added.
-
resourceUri
private volatile java.lang.String resourceUri
Deprecated.The target resource URI.
-
securityAdded
private volatile boolean securityAdded
Deprecated.Indicates if the security data was parsed and added.
-
userPrincipal
private final java.security.Principal userPrincipal
Deprecated.The user principal.
-
warningsAdded
private volatile boolean warningsAdded
Deprecated.Indicates if the warning data was parsed and added.
-
-
Constructor Detail
-
HttpInboundRequest
public HttpInboundRequest(Context context, Connection<Server> connection, java.lang.String methodName, java.lang.String resourceUri, java.lang.String protocol)
Deprecated.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)
Deprecated.Copy constructor.- Parameters:
request- The request to copy.
-
-
Method Detail
-
addHeader
public static void addHeader(Request request, java.lang.String headerName, java.lang.String headerValue)
Deprecated.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()
Deprecated.Description copied from class:RequestAsk the connector to attempt to abort the related network connection, for example immediately closing the socket.
-
commit
public void commit(Response response)
Deprecated.Description copied from class:RequestAsks the server connector to immediately commit the given response associated to this request, making it ready to be sent back to the client. Note that all server connectors don't necessarily support this feature.
-
flushBuffers
public void flushBuffers()
Deprecated.Description copied from class:MessageAsks the underlying connector to immediately flush the network buffers.- Overrides:
flushBuffersin classMessage
-
getAccessControlRequestHeaders
public java.util.Set<java.lang.String> getAccessControlRequestHeaders()
Deprecated.Description copied from class:RequestReturns the modifiable set of headers the client is willing to send in future request to this resource. Used when issuing a preflight CORS request to let the origin server knows what headers will be sent later.
Note that when used with HTTP connectors, this property maps to the "Access-Control-Allow-Headers" header.- Overrides:
getAccessControlRequestHeadersin classRequest- Returns:
- The headers the client is willing to send in future request to this resource. Useful for CORS support.
-
getAccessControlRequestMethod
public Method getAccessControlRequestMethod()
Deprecated.Description copied from class:RequestReturns the method the client is willing to use in future request to this resource. Used when issuing a preflight CORS request to let the origin server knows what method will be sent later.
Note that when used with HTTP connectors, this property maps to the "Access-Control-Request-Method" header.- Overrides:
getAccessControlRequestMethodin classRequest- Returns:
- The method the client is willing to send in future request to this resource. Useful for CORS support.
-
getCacheDirectives
public java.util.List<CacheDirective> getCacheDirectives()
Deprecated.Description copied from class:MessageReturns the cache directives.
Note that when used with HTTP connectors, this property maps to the "Cache-Control" header.- Overrides:
getCacheDirectivesin classMessage- Returns:
- The cache directives.
-
getChallengeResponse
public ChallengeResponse getChallengeResponse()
Deprecated.Description copied from class:RequestReturns the authentication response sent by a client to an origin server. Note that when used with HTTP connectors, this property maps to the "Authorization" header.- Overrides:
getChallengeResponsein classRequest- Returns:
- The authentication response sent by a client to an origin server.
-
getClientInfo
public ClientInfo getClientInfo()
Deprecated.Returns the client-specific information.- Overrides:
getClientInfoin classRequest- Returns:
- The client-specific information.
-
getConditions
public Conditions getConditions()
Deprecated.Returns the condition data applying to this call.- Overrides:
getConditionsin classRequest- Returns:
- The condition data applying to this call.
-
getConnection
public Connection<Server> getConnection()
Deprecated.Returns the related connection.- Specified by:
getConnectionin interfaceInboundRequest- Returns:
- The related connection.
-
getCookies
public Series<Cookie> getCookies()
Deprecated.Returns the cookies provided by the client.- Overrides:
getCookiesin classRequest- Returns:
- The cookies provided by the client.
-
getHeaders
public Series<Header> getHeaders()
Deprecated.Description copied from class:MessageReturns the series of lower-level HTTP headers. Please not that this method should rarely be used as most HTTP headers are already surfaced by the Restlet API. The result series can be used to deal with HTTP extension headers.- Specified by:
getHeadersin interfaceInboundRequest- Overrides:
getHeadersin classMessage- Returns:
- The HTTP headers.
-
getProxyChallengeResponse
public ChallengeResponse getProxyChallengeResponse()
Deprecated.Description copied from class:RequestReturns the authentication response sent by a client to a proxy. Note that when used with HTTP connectors, this property maps to the "Proxy-Authorization" header.- Overrides:
getProxyChallengeResponsein classRequest- Returns:
- The authentication response sent by a client to a proxy.
-
getRanges
public java.util.List<Range> getRanges()
Deprecated.Description copied from class:RequestReturns the ranges to return from the target resource's representation. Note that when used with HTTP connectors, this property maps to the "Range" header.
-
getRecipientsInfo
public java.util.List<RecipientInfo> getRecipientsInfo()
Deprecated.Description copied from class:MessageReturns the intermediary recipient information.
Note that when used with HTTP connectors, this property maps to the "Via" headers.- Overrides:
getRecipientsInfoin classMessage- Returns:
- The intermediary recipient information.
-
getReferrerRef
public Reference getReferrerRef()
Deprecated.Returns the referrer reference if available.- Overrides:
getReferrerRefin classRequest- Returns:
- The referrer reference.
-
getUserPrincipal
public java.security.Principal getUserPrincipal()
Deprecated.Returns the associated user principal.- Returns:
- The associated user principal.
-
getWarnings
public java.util.List<Warning> getWarnings()
Deprecated.Description copied from class:MessageReturns the additional warnings information.
Note that when used with HTTP connectors, this property maps to the "Warning" headers.- Overrides:
getWarningsin classMessage- Returns:
- The additional warnings information.
-
setAccessControlRequestHeaders
public void setAccessControlRequestHeaders(java.util.Set<java.lang.String> accessControlRequestHeaders)
Deprecated.Description copied from class:RequestSets the set of headers the client is willing to use in future request to this resource. Used when issuing a preflight CORS request to let the origin server knows what headers will be sent later.
Note that when used with HTTP connectors, this property maps to the "Access-Control-Request-Method" header.- Overrides:
setAccessControlRequestHeadersin classRequest- Parameters:
accessControlRequestHeaders- The set of headers the client is willing to send in future request to this resource. Useful for CORS support.
-
setAccessControlRequestMethod
public void setAccessControlRequestMethod(Method accessControlRequestMethod)
Deprecated.Description copied from class:RequestSets the method the client is willing to use in future request to this resource. Used when issuing a preflight CORS request to let the origin server knows what method will be sent later.
Note that when used with HTTP connectors, this property maps to the "Access-Control-Request-Method" header.- Overrides:
setAccessControlRequestMethodin classRequest- Parameters:
accessControlRequestMethod- The method the client is willing to send in future request to this resource. Useful for CORS support.
-
setChallengeResponse
public void setChallengeResponse(ChallengeResponse response)
Deprecated.Description copied from class:RequestSets the authentication response sent by a client to an origin server. Note that when used with HTTP connectors, this property maps to the "Authorization" header.- Overrides:
setChallengeResponsein classRequest- Parameters:
response- The authentication response sent by a client to an origin server.
-
setHeaders
public void setHeaders(Series<Header> headers)
Deprecated.Description copied from interface:InboundRequestPut the headers in the request's attributes map.- Specified by:
setHeadersin interfaceInboundRequest- Parameters:
headers- The headers.
-
setProxyChallengeResponse
public void setProxyChallengeResponse(ChallengeResponse response)
Deprecated.Description copied from class:RequestSets the authentication response sent by a client to a proxy. Note that when used with HTTP connectors, this property maps to the "Proxy-Authorization" header.- Overrides:
setProxyChallengeResponsein classRequest- Parameters:
response- The authentication response sent by a client to a proxy.
-
setRecipientsInfo
public void setRecipientsInfo(java.util.List<RecipientInfo> recipientsInfo)
Deprecated.Description copied from class:MessageSets the modifiable list of intermediary recipients. Note that when used with HTTP connectors, this property maps to the "Via" headers. This method clears the current list and adds all entries in the parameter list.- Overrides:
setRecipientsInfoin classMessage- Parameters:
recipientsInfo- A list of intermediary recipients.
-
setWarnings
public void setWarnings(java.util.List<Warning> warnings)
Deprecated.Description copied from class:MessageSets the additional warnings information. Note that when used with HTTP connectors, this property maps to the "Warning" headers. This method clears the current list and adds all entries in the parameter list.- Overrides:
setWarningsin classMessage- Parameters:
warnings- The warnings.
-
-