@JavaScript(implementation="org.jboss.arquillian.graphene.guard.RequestGuardImpl") public interface RequestGuard
Allows to manually retrieve information from Request Guard on a page.
This method is used internally by:
| Modifier and Type | Method and Description |
|---|---|
void |
clearFilters()
Clear all filters defined by
filter(String). |
RequestType |
clearRequestDone()
Clears the request type cache and returns the last request type
|
void |
filter(String eval)
Specifies JavaScript implementation of filter, which declares what requests will be guarded.
|
RequestState |
getRequestState() |
RequestType |
getRequestType() |
void |
setMaximumCallbackTimeout(int miliseconds)
Specifies maximum timeout (in miliseconds) for asynchronous scheduled callbacks which will be guarded (default: 50 ms).
|
RequestType getRequestType()
RequestState getRequestState()
RequestType clearRequestDone()
void filter(String eval)
Specifies JavaScript implementation of filter, which declares what requests will be guarded.
If the provided expression evaluates to false, a request won't be guarded.
In a 'eval' expression, you can use following contextual information:
Note that some values might need processing, for example body might be escaped:
E.g.: unescape(this.body).indexOf('javax.faces.source=f:poll') > 0
The expression above will detect, whether a request body contains some string.
void clearFilters()
filter(String).void setMaximumCallbackTimeout(int miliseconds)
Specifies maximum timeout (in miliseconds) for asynchronous scheduled callbacks which will be guarded (default: 50 ms).
Asynchronous scheduled callbacks are callbacks which are scheduled in XMLHttpRequests's onreadystatechange callback.
Usually are those callbacks scheduled for timeouts <= 50 just to postpone updates of user interface out of XHR processing.
Be aware that sometimes it is inappropriate to guard asynchronous scheduled callbacks - in this case you can set this value to -1 in order to guarding of scheduled callbacks at all.
Copyright © 2014 JBoss by Red Hat. All rights reserved.