org.restlet.ext.jaas
Class ChallengeCallbackHandler

java.lang.Object
  extended by org.restlet.ext.jaas.ChallengeCallbackHandler
All Implemented Interfaces:
CallbackHandler

public class ChallengeCallbackHandler
extends Object
implements CallbackHandler

JAAS callback handler that automatically provides the identifier and secret when asked by login modules.

Author:
Jerome Louvel

Constructor Summary
ChallengeCallbackHandler(Request request, Response response)
          Constructor.
 
Method Summary
 Request getRequest()
          Returns the handled request.
 Response getResponse()
          Returns the handled response.
protected  void handle(Callback callback)
          Handles a callback.
 void handle(Callback[] callbacks)
          Handles the callbacks.
 void setRequest(Request request)
          Sets the handled request.
 void setResponse(Response response)
          Sets the handled response.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChallengeCallbackHandler

public ChallengeCallbackHandler(Request request,
                                Response response)
Constructor.

Parameters:
request - The handled request.
response - The handled response.
Method Detail

getRequest

public Request getRequest()
Returns the handled request.

Returns:
The handled request.

getResponse

public Response getResponse()
Returns the handled response.

Returns:
The handled response.

handle

protected void handle(Callback callback)
               throws UnsupportedCallbackException
Handles a callback. The default implementation automatically sets the identifier on NameCallback instances and the secret on PasswordCallback.

Parameters:
callback - The callback to handle.
Throws:
UnsupportedCallbackException

handle

public void handle(Callback[] callbacks)
            throws IOException,
                   UnsupportedCallbackException
Handles the callbacks. The default implementation delegates the handling to the handle(Callback) method.

Specified by:
handle in interface CallbackHandler
Parameters:
callbacks - The callbacks to handle.
Throws:
IOException
UnsupportedCallbackException

setRequest

public void setRequest(Request request)
Sets the handled request.

Parameters:
request - The handled request.

setResponse

public void setResponse(Response response)
Sets the handled response.

Parameters:
response - The handled response.


Copyright © 2005-2013 Restlet.