Implementations of this interface are passed to a CallbackHandler, allowing underlying security services the ability to interact with a calling application to retrieve specific authentication data such as usernames and passwords, or to display certain information, such as error and warning messages. Callback implementations do not retrieve or display the information requested by underlying security services. Callback implementations simply provide the means to pass such requests to applications, and for applications, if appropriate, to return requested information back to the underlying security services.

解决方案 »

  1.   

    callback就是回调函数,所谓的回调函数,意指先在系统的某个地方对函数进行注册,让系统知道这个函数的存在,然后在以后,当某个事件发生时,再调用这个函数对事件进行响应。
      

  2.   

    给你个使用最多的地方,就是在awt或swing程序中加入监听器,其实这个过程就是一个时间回调的过程,具体原理不好说,你可以去搜索一下java的command设计模式。