Interface nsIHttpActivityObserverType

nsIHttpActivityObserver

This interface provides a way for http activities to be reported to observers.

Hierarchy

Properties

isActive: boolean

This attribute is true when this interface is active and should observe http activities. When false, observeActivity() should not be called. It is present for compatibility reasons and should be implemented only by nsHttpActivityDistributor.

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • observe activity from the http transport

    Parameters

    • aHttpChannel: nsISupports

      nsISupports interface for the the http channel that generated this activity

    • aActivityType: uint32_t

      The value of this aActivityType will be one of ACTIVITY_TYPE_SOCKET_TRANSPORT or ACTIVITY_TYPE_HTTP_TRANSACTION

    • aActivitySubtype: uint32_t

      The value of this aActivitySubtype, will be depend on the value of aActivityType. When aActivityType is ACTIVITY_TYPE_SOCKET_TRANSPORT aActivitySubtype will be one of the nsISocketTransport::STATUS_???? values defined in nsISocketTransport.idl OR when aActivityType is ACTIVITY_TYPE_HTTP_TRANSACTION aActivitySubtype will be one of the nsIHttpActivityObserver::ACTIVITY_SUBTYPE_???? values defined below

    • aTimestamp: number

      microseconds past the epoch of Jan 1, 1970

    • aExtraSizeData: uint64_t

      Any extra size data optionally available with this activity

    • aExtraStringData: string

      Any extra string data optionally available with this activity

    Returns void

  • This function is used when the real http channel is not available. We use the information in |HttpActivityArgs| to get the http channel or create a |NullHttpChannel|.

    Parameters

    • aArgs: HttpActivityArgs

      See the definition of |HttpActivityArgs| in PSocketProcess.ipdl.

    • aActivityType: uint32_t
    • aActivitySubtype: uint32_t
    • aTimestamp: number
    • aExtraSizeData: uint64_t
    • aExtraStringData: string

    Returns void

  • This function is for testing only. We use this function to observe the activities of HTTP connections. To receive this notification, observeConnection should be set to true.

    Parameters

    • aHost: string
    • aPort: int32_t
    • aSSL: boolean
    • aHasECH: boolean
    • aIsHttp3: boolean
    • aActivityType: uint32_t
    • aActivitySubtype: uint32_t
    • aTimestamp: number
    • aExtraStringData: string

    Returns void

  • This function is for internal use only. Every time a http transaction is created in socket process, we use this function to set the value of |isActive|. We need this since the real value of |isActive| is only available in parent process.

    Parameters

    • aActived: boolean

    Returns void

Generated using TypeDoc