IT. Expert System.

Android Reference

AndroidHttpClientConnection


android.net.http

Class AndroidHttpClientConnection



  • public class AndroidHttpClientConnection
    extends Object
    A alternate class for (@link DefaultHttpClientConnection). It has better performance than DefaultHttpClientConnection
    • Constructor Detail

      • AndroidHttpClientConnection

        public AndroidHttpClientConnection()
    • Method Detail

      • bind

        public void bind(Socket socket,
                HttpParams params)
                  throws IOException
        Bind socket and set HttpParams to AndroidHttpClientConnection
        Parameters:
        socket - outgoing socket
        params - HttpParams
        Throws:
        IOException
      • toString

        public String toString()
        Description copied from class: Object
        Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:
           getClass().getName() + '@' + Integer.toHexString(hashCode())

        See Writing a useful toString method if you intend implementing your own toString method.

        Overrides:
        toString in class Object
        Returns:
        a printable representation of this object.
      • isOpen

        public boolean isOpen()
      • getLocalPort

        public int getLocalPort()
      • getRemoteAddress

        public InetAddress getRemoteAddress()
      • getRemotePort

        public int getRemotePort()
      • setSocketTimeout

        public void setSocketTimeout(int timeout)
      • getSocketTimeout

        public int getSocketTimeout()
      • sendRequestHeader

        public void sendRequestHeader(HttpRequest request)
                               throws HttpException,
                                      IOException
        Sends the request line and all headers over the connection.
        Parameters:
        request - the request whose headers to send.
        Throws:
        HttpException
        IOException
      • sendRequestEntity

        public void sendRequestEntity(HttpEntityEnclosingRequest request)
                               throws HttpException,
                                      IOException
        Sends the request entity over the connection.
        Parameters:
        request - the request whose entity to send.
        Throws:
        HttpException
        IOException
      • parseResponseHeader

        public StatusLine parseResponseHeader(Headers headers)
                                       throws IOException,
                                              ParseException
        Parses the response headers and adds them to the given headers object, and returns the response StatusLine
        Parameters:
        headers - store parsed header to headers.
        Returns:
        StatusLine
        Throws:
        IOException
        ParseException
        See Also:
        HttpClientConnection#receiveResponseHeader()
      • receiveResponseEntity

        public HttpEntity receiveResponseEntity(Headers headers)
        Return the next response entity.
        Parameters:
        headers - contains values for parsing entity
        See Also:
        HttpClientConnection#receiveResponseEntity(HttpResponse response)
      • isStale

        public boolean isStale()
        Checks whether this connection has gone down. Network connections may get closed during some time of inactivity for several reasons. The next time a read is attempted on such a connection it will throw an IOException. This method tries to alleviate this inconvenience by trying to find out if a connection is still usable. Implementations may do that by attempting a read with a very small timeout. Thus this method may block for a small amount of time before returning a result. It is therefore an expensive operation.
        Returns:
        true if attempts to use this connection are likely to succeed, or false if they are likely to fail and this connection should be closed
      • getMetrics

        public HttpConnectionMetrics getMetrics()
        Returns a collection of connection metrcis
        Returns:
        HttpConnectionMetrics


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: 223 / 158852225. Delta: 0.09544 с