com.metamatrix.common.callback
Interface CallbackHandler

All Known Implementing Classes:
CDKCallbackHandler, DialogFactoryCallbackHandler

public interface CallbackHandler

An application implements a CallbackHandler and passes it to underlying security services so that they may interact with the application to retrieve specific authentication data, such as usernames and passwords, or to display certain information, such as error and warning messages.

CallbackHandlers are implemented in an application-dependent fashion. For example, implementations for an application with a graphical user interface (GUI) may pop up windows to prompt for requested information or to display error messages. An implementation may also choose to obtain requested information from an alternate source without asking the end user.


Method Summary
 void handle(Callback callback, java.lang.Object source)
          Retrieve or display the requested information in the Callback object.
 

Method Detail

handle

void handle(Callback callback,
            java.lang.Object source)
            throws java.io.IOException
Retrieve or display the requested information in the Callback object.

The implementation should process all callback objects before returning, since the caller of this method is free to retrieve the requested information from the callback objects immediately after this method returns.

Parameters:
callbacks - an array of Callback objects provided by the method caller, and which contain the information requested to be retrieved or displayed.
source - the object that is considered the source of the callbacks.
Throws:
java.io.IOException - if an input or output error occurs does not support one or more of the Callbacks specified in the callbacks parameter


Copyright © 2009. All Rights Reserved.