Class AbstractHttpServerConnection

    • Constructor Detail

      • AbstractHttpServerConnection

        public AbstractHttpServerConnection()
        Creates an instance of this class.

        This constructor will invoke createEntityDeserializer() and createEntitySerializer() methods in order to initialize HTTP entity serializer and deserializer implementations for this connection.

    • Method Detail

      • isStale

        public boolean isStale()
        Description copied from interface: HttpConnection
        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.
        Specified by:
        isStale in interface HttpConnection
        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