public class RequestGuardInterceptor extends Object implements CommandInterceptor
| Constructor and Description |
|---|
RequestGuardInterceptor(RequestType requestExpected,
boolean interlayed)
Constructs the guard with predefined expected RequestType
|
| Modifier and Type | Method and Description |
|---|---|
void |
doAfterCommand()
Waits for changing the requestDone flag (or for timeout, when flag stay to be NONE).
|
void |
doBeforeCommand()
Install the PageExtensions (which is used to figure out, what requestType was actually done) and clear the request type
to NONE state.
|
void |
intercept(CommandContext ctx)
Enfolds the command with guarding code to detect request type
|
public RequestGuardInterceptor(RequestType requestExpected, boolean interlayed)
requestExpected - the RequestType which is expected to be doneinterlayed - indicates whenever the request can be interlayed by another requestpublic void intercept(CommandContext ctx) throws CommandInterceptorException
intercept in interface CommandInterceptorCommandInterceptorExceptionpublic void doBeforeCommand()
public void doAfterCommand()
Waits for changing the requestDone flag (or for timeout, when flag stay to be NONE).
Then figure out what requestType was actually done and compare to expected one.
RequestGuardException - when done requestType doesn't equal to expected oneCopyright © 2013 JBoss by Red Hat. All Rights Reserved.