IT. Expert System.

Android Reference



Class TestEventHandler

  • All Implemented Interfaces:

    public class TestEventHandler
    extends Object
    implements EventHandler
    Implements EventHandler and provides test functionality to validate responses to requests from the test server
    • Constructor Detail

      • TestEventHandler

        public TestEventHandler()
    • Method Detail

      • requestSent

        public void requestSent()
        Implementation of EventHandler method called when a request has been sent. If the test is waiting for this call, it will be signalled, otherwise this method will trigger the response to be read automatically.
      • status

        public void status(int major_version,
                  int minor_version,
                  int code,
                  String reason_phrase)
        Implements the EventHandler status method called when a server status response is received.
        Specified by:
        status in interface EventHandler
        major_version - The HTTP major version
        minor_version - The HTTP minor version
        code - The status code
        reason_phrase - A reason phrase passed to us by the server
      • headers

        public void headers(Headers headers)
        Implements the EventHandler headers method called when a server sends header fields
        Specified by:
        headers in interface EventHandler
      • locationChanged

        public void locationChanged(String newLocation,
                           boolean permanent)
        Implements the EventHandler locationChanged method called when a server sends a redirect message
        newLocation - The URL to the new server
        permanent - Indicator of whether this is a permanent change
      • data

        public void data(byte[] data,
                int len)
        Implements the EventHandler data method called when a server sends content data
        Specified by:
        data in interface EventHandler
        data - The byte array content
        len - The length of the data
      • endData

        public void endData()
        Implements the EventHandler endData method called to indicate completion or a request
        Specified by:
        endData in interface EventHandler
      • certificate

        public void certificate(SslCertificate certificate)
        Implements the EventHandler certificate method called every time a resource is loaded via a secure connection
        Specified by:
        certificate in interface EventHandler
      • error

        public void error(int id,
                 String description)
        Implements the EventHandler error method called when a server sends header fields
        Specified by:
        error in interface EventHandler
        id - Status code of the error
        description - Brief description of the error
      • handleSslErrorRequest

        public boolean handleSslErrorRequest(SslError error)
        SSL certificate error callback. Handles SSL error(s) on the way up to the user.
        Specified by:
        handleSslErrorRequest in interface EventHandler
        True if the callback can handle the error, which means it will call restartConnection() to unblock the thread later, otherwise return false.
      • setNetRunner

        public void setNetRunner(LowLevelNetRunner runner)
        Use the low level net runner with no delayed response
        runner - The LowLevelNetRunner object
      • setNetRunner

        public void setNetRunner(LowLevelNetRunner runner,
                        boolean delayedResponse)
        Use the low level net runner and specify if the response should be delayed
        runner - The LowLevelNetRunner object
        delayedResponse - Set to true is you will use the waitForRequestSent/waitForRequestResponse routines
      • waitForRequestResponse

        public void waitForRequestResponse()
        Enable this listeners Request object to read server responses. This should only be used in conjunction with setDelayResponse(true)
      • waitForRequestSent

        public void waitForRequestSent()
        Enable this listeners Request object to read server responses. This should only be used in conjunction with setDelayResponse(true)
      • expectRequestSent

        public void expectRequestSent()
      • expectNoRequestSent

        public void expectNoRequestSent()
      • expectStatus

        public void expectStatus()
      • expectNoStatus

        public void expectNoStatus()
      • expectStatus

        public void expectStatus(int major,
                        int minor,
                        int code)
      • expectStatus

        public void expectStatus(int code)
      • expectHeaders

        public void expectHeaders()
      • expectNoHeaders

        public void expectNoHeaders()
      • expectHeaderAdd

        public void expectHeaderAdd(String name)
      • expectHeaderAdd

        public void expectHeaderAdd(String name,
                           String value)
      • expectLocationChanged

        public void expectLocationChanged()
      • expectNoLocationChanged

        public void expectNoLocationChanged()
      • expectLocationChanged

        public void expectLocationChanged(String newLocation)
      • expectLocationChanged

        public void expectLocationChanged(String newLocation,
                                 boolean permanent)
      • expectData

        public void expectData()
      • expectNoData

        public void expectNoData()
      • expectData

        public void expectData(int len)
      • expectData

        public void expectData(byte[] data,
                      int len)
      • expectEndData

        public void expectEndData()
      • expectNoEndData

        public void expectNoEndData()
      • expectError

        public void expectError()
      • expectNoError

        public void expectNoError()
      • expectError

        public void expectError(int errorId)
      • expectSSLCertificateError

        public void expectSSLCertificateError()
      • expectNoSSLCertificateError

        public void expectNoSSLCertificateError()
      • expectSSLCertificateError

        public void expectSSLCertificateError(int errors)
      • expectSSLCertificateError

        public void expectSSLCertificateError(SslCertificate certificate)
      • expectPassed

        public boolean expectPassed()
        Test to see if current expectations match recieved information
        True is all expected results have been matched
      • getFailureMessage

        public String getFailureMessage()
        Return message indicating expectation failures
      • resetExpects

        public void resetExpects()
        Reset all expectation values for re-use
      • attachRequestHandle

        public void attachRequestHandle(RequestHandle requestHandle)
        Attach the RequestHandle to this handler
        requestHandle - The RequestHandle
      • detachRequestHandle

        public void detachRequestHandle()
        Detach the RequestHandle


Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)





Java Script








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

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: 321 / 158861594. Delta: 0.05677 с