IT. Expert System.

Android Reference

RequestQueue


android.net.http

Class RequestQueue



  • public class RequestQueue
    extends Object
    • Constructor Detail

      • RequestQueue

        public RequestQueue(Context context)
        A RequestQueue class instance maintains a set of queued requests. It orders them, makes the requests against HTTP servers, and makes callbacks to supplied eventHandlers as data is read. It supports request prioritization, connection reuse and pipelining.
        Parameters:
        context - application context
      • RequestQueue

        public RequestQueue(Context context,
                    int connectionCount)
        A RequestQueue class instance maintains a set of queued requests. It orders them, makes the requests against HTTP servers, and makes callbacks to supplied eventHandlers as data is read. It supports request prioritization, connection reuse and pipelining.
        Parameters:
        context - application context
        connectionCount - The number of simultaneous connections
    • Method Detail

      • enablePlatformNotifications

        public void enablePlatformNotifications()
        Enables data state and proxy tracking
      • disablePlatformNotifications

        public void disablePlatformNotifications()
        If platform notifications have been enabled, call this method to disable before destroying RequestQueue
      • getProxyHost

        public HttpHost getProxyHost()
        used by webkit
        Returns:
        proxy host if set, null otherwise
      • queueRequest

        public RequestHandle queueRequest(String url,
                                 String method,
                                 Map<String,String> headers,
                                 EventHandler eventHandler,
                                 InputStream bodyProvider,
                                 int bodyLength)
        Queues an HTTP request
        Parameters:
        url - The url to load.
        method - "GET" or "POST."
        headers - A hashmap of http headers.
        eventHandler - The event handler for handling returned data. Callbacks will be made on the supplied instance.
        bodyProvider - InputStream providing HTTP body, null if none
        bodyLength - length of body, must be 0 if bodyProvider is null
      • queueRequest

        public RequestHandle queueRequest(String url,
                                 WebAddress uri,
                                 String method,
                                 Map<String,String> headers,
                                 EventHandler eventHandler,
                                 InputStream bodyProvider,
                                 int bodyLength)
        Queues an HTTP request
        Parameters:
        url - The url to load.
        uri - The uri of the url to load.
        method - "GET" or "POST."
        headers - A hashmap of http headers.
        eventHandler - The event handler for handling returned data. Callbacks will be made on the supplied instance.
        bodyProvider - InputStream providing HTTP body, null if none
        bodyLength - length of body, must be 0 if bodyProvider is null
      • getRequest

        public android.net.http.Request getRequest()
      • getRequest

        public android.net.http.Request getRequest(HttpHost host)
        Returns:
        a request for given host if possible
      • haveRequest

        public boolean haveRequest(HttpHost host)
        Returns:
        true if a request for this host is available
      • requeueRequest

        public void requeueRequest(android.net.http.Request request)
        Put request back on head of queue
      • shutdown

        public void shutdown()
        This must be called to cleanly shutdown RequestQueue
      • queueRequest

        protected void queueRequest(android.net.http.Request request,
                        boolean head)
      • startTiming

        public void startTiming()
      • stopTiming

        public void stopTiming()


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 595 / . Delta: 0.02163 с