|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.errai.security.client.local.callback.DefaultRestSecurityErrorCallback
@Dependent public class DefaultRestSecurityErrorCallback
A RestErrorCallback
that catches UnauthenticatedExceptions
and UnauthorizedExceptions
and navigates to the page with the LoginPage
or SecurityError
role, respectively.
Optionally, this class can wrap a given RestErrorCallback
that it
will call first, in which case this class will only perform the actions
described above if the wrapped callback returns true.
Constructor Summary | |
---|---|
DefaultRestSecurityErrorCallback(RestErrorCallback wrapped,
SecurityContext context)
Create a DefaultRestSecurityErrorCallback wrapping a given
RestErrorCallback . |
|
DefaultRestSecurityErrorCallback(SecurityContext context)
Create a DefaultRestSecurityErrorCallback . |
Method Summary | |
---|---|
boolean |
error(com.google.gwt.http.client.Request message,
Throwable throwable)
Called when an error occurs on the bus. |
RestErrorCallback |
setWrappedErrorCallback(RestErrorCallback wrapped)
Set the wrapped callback that will be invoked first when RestErrorCallback#error(Request, Throwable) is called. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultRestSecurityErrorCallback(RestErrorCallback wrapped, SecurityContext context)
DefaultRestSecurityErrorCallback
wrapping a given
RestErrorCallback
.
wrapped
- The wrapped callback (should never be null
, that will be
invoked first when
RestErrorCallback#error(Request, Throwable)
is called. If
the error method on the wrapped
returns false
, the
whole callback returns false
immediately.context
- The SecurityContext
.@Inject public DefaultRestSecurityErrorCallback(SecurityContext context)
DefaultRestSecurityErrorCallback
.
context
- The SecurityContext
.Method Detail |
---|
public boolean error(com.google.gwt.http.client.Request message, Throwable throwable) throws MissingPageRoleException
ErrorCallback
error
in interface ErrorCallback<com.google.gwt.http.client.Request>
message
- The message or request for which the failure occurred.throwable
- The exception thrown or null if not available
MissingPageRoleException
public RestErrorCallback setWrappedErrorCallback(RestErrorCallback wrapped)
RestErrorCallback#error(Request, Throwable)
is called. If the error
method on the wrapped callback returns false
, the whole callback
returns false
immediately.
wrapped
- The wrapped callback. Passing in null
clears any previous
wrapped callback.
|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |