version 1.0

com.actimind.actiwate.testing.events
Interface XmlHttpRequestAsyncEvent

All Superinterfaces:
AsyncEvent

public interface XmlHttpRequestAsyncEvent
extends AsyncEvent

XmlHttpRequest async event.
For each successful call to "send" method of XmlHttpRequest javascript object four XmlHttpRequest async events will be generated corresponding to LOADING, LOADED, INTERACTIVE and COMPLETED states of XmlHttpRequest javascript object. These events will be sheduled one by one, i.e. event corresponding to LOADING state will be sheduled first, after its execution event corresponding to LOADED state will be sheduled and so on. These events can be distinguished by calling getReadyState() method. Offsets for sheduling XmlHttpRequest async events with these states can be set using ActiwateSession.setXmlHttpRequestConfig(XmlHttpRequestConfig) method.
NOTE: XmlHttpRequest async events are created only for asynchronous XmlHttpRequests, for synchronous XmlHttpRequests no XmlHttpRequest async events are generated and these XmlHttpRequests are executed immediately.

See Also:
XmlHttpRequestReadyStates, XmlHttpRequestConfig

Field Summary
 
Fields inherited from interface com.actimind.actiwate.testing.events.AsyncEvent
INTERVAL, METAREFRESH, TIMEOUT, XMLHTTPREQUEST
 
Method Summary
 java.lang.String getJsHandlerName()
          Returns name of the handler specified in onreadystatechange property of corresponding XmlHttpRequest object.
 int getReadyState()
          Returns readyState which will be set to XmlHttpRequest object when this event will be executed.
 java.lang.String getRequestURL()
          Returns url of the resource being requested.
 int getXmlHttpRequestInstanceId()
          Returns instanse id of the corresponding XmlHttpRequest javascript object.
 
Methods inherited from interface com.actimind.actiwate.testing.events.AsyncEvent
getOriginatingNode, getPage, getTimeOffset, getType, isCancelled, isExecuted
 

Method Detail

getRequestURL

public java.lang.String getRequestURL()
Returns url of the resource being requested.

Returns:
url of the resource being requested.

getXmlHttpRequestInstanceId

public int getXmlHttpRequestInstanceId()
Returns instanse id of the corresponding XmlHttpRequest javascript object. This id will be unique in the context of the test.

Returns:
instanse id of the corresponding XmlHttpRequest javascript object.

getReadyState

public int getReadyState()
Returns readyState which will be set to XmlHttpRequest object when this event will be executed.

Returns:
readyState which will be set to XmlHttpRequest object when this event will be executed.
See Also:
XmlHttpRequestReadyStates

getJsHandlerName

public java.lang.String getJsHandlerName()
Returns name of the handler specified in onreadystatechange property of corresponding XmlHttpRequest object.

Returns:
name of the handler specified in onreadystatechange property of corresponding XmlHttpRequest object.


Copyright © 2007 Actimind, Inc. All Rights Reserved.