|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RequestListener
Listener for receiving various events associated with the loading of asynchronous requests.
Field Summary | |
---|---|
static long |
STATE_IS_BROKEN
This flag indicates an unknown security state. |
static long |
STATE_IS_DOCUMENT
This flag indicates that the state transition is for a document request. |
static long |
STATE_IS_INSECURE
This flag indicates that the data corresponding to the request was received over an insecure channel. |
static long |
STATE_IS_NETWORK
This flag indicates that the state transition corresponds to the start or stop of activity in the indicated nsIWebProgress instance. |
static long |
STATE_IS_REQUEST
This flag indicates that the state transition is for a request, which includes but is not limited to document requests. |
static long |
STATE_IS_SECURE
This flag indicates that the data corresponding to the request was received over a secure channel. |
static long |
STATE_IS_WINDOW
This flag indicates that the state transition corresponds to the start or stop of activity in the indicated nsIWebProgress instance. |
static long |
STATE_NEGOTIATING
This flag is not used. |
static long |
STATE_REDIRECTING
This flag indicates that a request is being redirected. |
static long |
STATE_RESTORING
This flag indicates that the state transition corresponds to the start or stop of activity for restoring a previously-rendered presentation. |
static long |
STATE_SECURE_HIGH
This flag indicates a high degree of security. |
static long |
STATE_SECURE_LOW
This flag indicates a low degree of security. |
static long |
STATE_SECURE_MED
This flag indicates a medium degree of security. |
static long |
STATE_START
This flag indicates the start of a request. |
static long |
STATE_STOP
This flag indicates the completion of a request. |
static long |
STATE_TRANSFERRING
This flag indicates that data for a request is being transferred to an end consumer. |
Method Summary | |
---|---|
void |
locationChanged(LocationEvent event)
Invoked when the location of the window being watched changes. |
void |
progressChanged(ProgressEvent event)
Invoked when the progress has changed for one of the requests. |
void |
securityChanged(SecurityEvent event)
Invoked on security transitions (eg HTTP -> HTTPS, HTTPS -> HTTP, FOO -> HTTPS) and after document load completion. |
void |
stateChanged(StateEvent event)
Notification indicating the state has changed for one of the requests. |
void |
statusChanged(StatusEvent event)
Invoked when the status of a request has changed. |
Field Detail |
---|
static final long STATE_START
stateChanged(StateEvent)
is called for the same request with the
STATE_STOP
flag set.
static final long STATE_REDIRECTING
stateChanged(StateEvent)
is the request that is being
redirected. When a redirect occurs, a new request is generated
automatically to process the new request. Expect a corresponding
STATE_START
event for the new request, and a STATE_STOP
for the redirected request.
static final long STATE_TRANSFERRING
static final long STATE_NEGOTIATING
static final long STATE_STOP
stateChanged(StateEvent)
indicates the final status of the
request.
static final long STATE_IS_REQUEST
static final long STATE_IS_DOCUMENT
STATE_IS_REQUEST
. A document
request supports the nsIChannel interface and its loadFlags attribute
includes the nsIChannel::LOAD_DOCUMENT_URI flag.
A document request does not complete until all requests associated with
the loading of its corresponding document have completed. This includes
other document requests (e.g., corresponding to HTML <iframe>
elements). The document corresponding to a document request is available
via the DOMWindow attribute of stateChanged(StateEvent)
's
aWebProgress parameter.
static final long STATE_IS_NETWORK
STATE_START
or STATE_STOP
, and it
may be combined with other State Type Flags.
Unlike STATE_IS_WINDOW
, this flag is only set when activity
within the nsIWebProgress instance being observed starts or stops. If
activity only occurs in a child nsIWebProgress instance, then this flag
will be set to indicate the start and stop of that activity.
For example, in the case of navigation within a single frame of a HTML
frameset, a nsIWebProgressListener instance attached to the
nsIWebProgress of the frameset window will receive
stateChanged(StateEvent)
calls with the
STATE_IS_NETWORK
flag set to indicate the start and stop of said
navigation. In other words, an observer of an outer window can determine
when activity, that may be constrained to a child window or set of child
windows, starts and stops.
static final long STATE_IS_WINDOW
STATE_START
or STATE_STOP
, and it
may be combined with other State Type Flags.
This flag is similar to STATE_IS_DOCUMENT
. However, when a
document request completes, two stateChanged(StateEvent)
calls
with STATE_STOP are generated. The document request is passed as aRequest
to both calls. The first has STATE_IS_REQUEST
and
#STATE_IS_DOCUMENT
set, and the second has the
#STATE_IS_WINDOW
flag set (and possibly the
#STATE_IS_NETWORK
flag set as well -- see above for a description
of when the STATE_IS_NETWORK
flag may be set). This second
#STATE_STOP
event may be useful as a way to partition the work
that occurs when a document request completes.
static final long STATE_RESTORING
static final long STATE_IS_INSECURE
static final long STATE_IS_BROKEN
static final long STATE_IS_SECURE
static final long STATE_SECURE_HIGH
static final long STATE_SECURE_MED
static final long STATE_SECURE_LOW
Method Detail |
---|
void stateChanged(StateEvent event)
STATE_START
, STATE_REDIRECTING
,
STATE_TRANSFERRING
, STATE_NEGOTIATING
,
STATE_STOP
.
These flags indicate the various states that requests may transition
through as they are being loaded. These flags are mutually exclusive.
For any given request, stateChanged(StateEvent)
is called once
with the #STATE_START
flag, zero or more times with the
#STATE_TRANSFERRING
flag or once with the
#STATE_REDIRECTING
flag, and then finally once with the
#STATE_STOP
flag. NOTE: For document requests, a second
#STATE_STOP
is generated (see the description of
#STATE_IS_WINDOW
for more details).
State Type Flags: #STATE_IS_REQUEST
, #STATE_IS_DOCUMENT
,
#STATE_IS_NETWORK
, #STATE_IS_WINDOW
.
These flags further describe the entity for which the state transition is
occuring. These flags are NOT mutually exclusive (i.e., an
#stateChanged(StateEvent)
event may indicate some combination
of these flags).
State Modifier Flags: STATE_RESTORING
.
These flags further describe the transition which is occuring. These
flags are NOT mutually exclusive (i.e., an
#stateChanged (StateEvent)
event may indicate some combination
of these flags).
event
- event objectvoid progressChanged(ProgressEvent event)
event
- event objectvoid locationChanged(LocationEvent event)
event
- event objectvoid statusChanged(StatusEvent event)
event
- event objectvoid securityChanged(SecurityEvent event)
STATE_IS_INSECURE
,
STATE_IS_BROKEN
, STATE_IS_SECURE
.
These flags describe the security state reported by a call to the
onSecurityChange method. These flags are mutually exclusive.
Security Strength Flags: STATE_SECURE_HIGH
,
STATE_SECURE_MED
, STATE_SECURE_LOW
These flags describe the security strength and accompany
STATE_IS_SECURE
in a call to the onSecurityChange method. These
flags are mutually exclusive.
These flags are not meant to provide a precise description of data
transfer security. These are instead intended as a rough indicator that
may be used to, for example, color code a security indicator or otherwise
provide basic data transfer security feedback to the user.
event
- event object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |