public class CallbackHandlerWrapper extends java.lang.Object implements AFCallbackHandler
CallbackHandler treated as
AFCallbackHandler. This only works locally, that is the wrapped
callback handler cannot be remote. However, this wrapper can be used
remotely.| Modifier and Type | Field and Description |
|---|---|
protected javax.security.auth.callback.CallbackHandler |
handler
The handler to which all callback requests are forwarded.
|
| Constructor and Description |
|---|
CallbackHandlerWrapper(javax.security.auth.callback.CallbackHandler handler)
Creates a new
AFCallbackHandler that wraps the designated
CallbackHandler appropriately. |
| Modifier and Type | Method and Description |
|---|---|
javax.security.auth.callback.Callback[] |
handle(javax.security.auth.callback.Callback[] callbacks)
This method is similar to
CallbackHandler.handle(Callback[]) but returns the provided callbacks back
to the caller. |
protected final javax.security.auth.callback.CallbackHandler handler
public CallbackHandlerWrapper(javax.security.auth.callback.CallbackHandler handler)
AFCallbackHandler that wraps the designated
CallbackHandler appropriately.handler - The handler to which all callback requests are forwarded.public javax.security.auth.callback.Callback[] handle(javax.security.auth.callback.Callback[] callbacks)
throws java.io.IOException,
javax.security.auth.callback.UnsupportedCallbackException
AFCallbackHandlerCallbackHandler.handle(Callback[]) but returns the provided callbacks back
to the caller. This allows for calling this method remotely. Note that all
callbacks need to be serialisable. handle in interface AFCallbackHandlercallbacks - The callbacks to be handled by this callback handler.java.io.IOException - If an input or output error occurs, an
IOException will be thrown.javax.security.auth.callback.UnsupportedCallbackException - If the implementation of this method
does not support one or more of the callbacks specified in the
callbacks parameter, an
UnsupportedCallbackException will be thrown.