Graphene Implementation 1.0.0.CR3

org.jboss.arquillian.ajocado.guard
Class RequestGuardImpl

java.lang.Object
  extended by org.jboss.arquillian.ajocado.guard.RequestGuardImpl
All Implemented Interfaces:
RequestGuard

public class RequestGuardImpl
extends Object
implements RequestGuard

Java API for interception of HTTP/XMLHttpRequest requests.

Needs to have PageExtensions installed in the current page using PageExtensionsImpl.install().

Version:
$Revision$
Author:
Lukas Fryc

Constructor Summary
RequestGuardImpl()
           
 
Method Summary
 RequestType clearRequestDone()
           Clears the request type indicated on the page, gives possibility to intercept subsequent requests.
 RequestType getRequestDone()
          Obtains the done requestType from page.
 void waitForRequest()
          Waits for change of RequestType indicated on the page from NONE to other value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestGuardImpl

public RequestGuardImpl()
Method Detail

getRequestDone

public RequestType getRequestDone()
Obtains the done requestType from page.

Specified by:
getRequestDone in interface RequestGuard
Returns:
the RequestType what was done
Throws:
IllegalStateException - when the unknown type of request was obtained

clearRequestDone

public RequestType clearRequestDone()

Clears the request type indicated on the page, gives possibility to intercept subsequent requests.

Returns the last RequestType set.

Specified by:
clearRequestDone in interface RequestGuard
Returns:
the last RequestType done
Throws:
IllegalStateException - when the unknown type of request was obtained

waitForRequest

public void waitForRequest()
Waits for change of RequestType indicated on the page from NONE to other value.

Specified by:
waitForRequest in interface RequestGuard

Graphene Implementation 1.0.0.CR3

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.