Class 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 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: Request
        Ask the connector to attempt to abort the related network connection, for example immediately closing the socket.
        Overrides:
        abort in class Request
        Returns:
        True if the request was aborted.
      • commit

        public void commit​(Response response)
        Deprecated.
        Description copied from class: Request
        Asks 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.
        Overrides:
        commit in class Request
      • flushBuffers

        public void flushBuffers()
        Deprecated.
        Description copied from class: Message
        Asks the underlying connector to immediately flush the network buffers.
        Overrides:
        flushBuffers in class Message
      • getAccessControlRequestHeaders

        public java.util.Set<java.lang.String> getAccessControlRequestHeaders()
        Deprecated.
        Description copied from class: Request
        Returns 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:
        getAccessControlRequestHeaders in class Request
        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: Request
        Returns 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:
        getAccessControlRequestMethod in class Request
        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: Message
        Returns the cache directives.

        Note that when used with HTTP connectors, this property maps to the "Cache-Control" header.
        Overrides:
        getCacheDirectives in class Message
        Returns:
        The cache directives.
      • getChallengeResponse

        public ChallengeResponse getChallengeResponse()
        Deprecated.
        Description copied from class: Request
        Returns 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:
        getChallengeResponse in class Request
        Returns:
        The authentication response sent by a client to an origin server.
      • getClientInfo

        public ClientInfo getClientInfo()
        Deprecated.
        Returns the client-specific information.
        Overrides:
        getClientInfo in class Request
        Returns:
        The client-specific information.
      • getConditions

        public Conditions getConditions()
        Deprecated.
        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()
        Deprecated.
        Returns the cookies provided by the client.
        Overrides:
        getCookies in class Request
        Returns:
        The cookies provided by the client.
      • getHeaders

        public Series<Header> getHeaders()
        Deprecated.
        Description copied from class: Message
        Returns 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:
        getHeaders in interface InboundRequest
        Overrides:
        getHeaders in class Message
        Returns:
        The HTTP headers.
      • getProxyChallengeResponse

        public ChallengeResponse getProxyChallengeResponse()
        Deprecated.
        Description copied from class: Request
        Returns 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:
        getProxyChallengeResponse in class Request
        Returns:
        The authentication response sent by a client to a proxy.
      • getRanges

        public java.util.List<Range> getRanges()
        Deprecated.
        Description copied from class: Request
        Returns the ranges to return from the target resource's representation. Note that when used with HTTP connectors, this property maps to the "Range" header.
        Overrides:
        getRanges in class Request
        Returns:
        The ranges to return.
      • getRecipientsInfo

        public java.util.List<RecipientInfo> getRecipientsInfo()
        Deprecated.
        Description copied from class: Message
        Returns the intermediary recipient information.

        Note that when used with HTTP connectors, this property maps to the "Via" headers.
        Overrides:
        getRecipientsInfo in class Message
        Returns:
        The intermediary recipient information.
      • getReferrerRef

        public Reference getReferrerRef()
        Deprecated.
        Returns the referrer reference if available.
        Overrides:
        getReferrerRef in class Request
        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: Message
        Returns the additional warnings information.

        Note that when used with HTTP connectors, this property maps to the "Warning" headers.
        Overrides:
        getWarnings in class Message
        Returns:
        The additional warnings information.
      • setAccessControlRequestHeaders

        public void setAccessControlRequestHeaders​(java.util.Set<java.lang.String> accessControlRequestHeaders)
        Deprecated.
        Description copied from class: Request
        Sets 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:
        setAccessControlRequestHeaders in class Request
        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: Request
        Sets 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:
        setAccessControlRequestMethod in class Request
        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: Request
        Sets 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:
        setChallengeResponse in class Request
        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: 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)
        Deprecated.
        Description copied from class: Request
        Sets 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:
        setProxyChallengeResponse in class Request
        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: Message
        Sets 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:
        setRecipientsInfo in class Message
        Parameters:
        recipientsInfo - A list of intermediary recipients.
      • setWarnings

        public void setWarnings​(java.util.List<Warning> warnings)
        Deprecated.
        Description copied from class: Message
        Sets 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:
        setWarnings in class Message
        Parameters:
        warnings - The warnings.