Class TextCallbackHandler

  • All Implemented Interfaces:
    javax.security.auth.callback.CallbackHandler

    public class TextCallbackHandler
    extends java.lang.Object
    implements javax.security.auth.callback.CallbackHandler
    • Constructor Summary

      Constructors 
      Constructor Description
      TextCallbackHandler()
      Creates a callback handler that prompts and reads from the command line for answers to authentication questions.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void handle​(javax.security.auth.callback.Callback[] callbacks)
      Handles the specified set of callbacks.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TextCallbackHandler

        public TextCallbackHandler()

        Creates a callback handler that prompts and reads from the command line for answers to authentication questions. This can be used by JAAS applications to instantiate a CallbackHandler.

    • Method Detail

      • handle

        public void handle​(javax.security.auth.callback.Callback[] callbacks)
                    throws java.io.IOException,
                           javax.security.auth.callback.UnsupportedCallbackException
        Handles the specified set of callbacks.
        Specified by:
        handle in interface javax.security.auth.callback.CallbackHandler
        Parameters:
        callbacks - the callbacks to handle
        Throws:
        java.io.IOException - if an input or output error occurs.
        javax.security.auth.callback.UnsupportedCallbackException - if the callback is not an instance of NameCallback or PasswordCallback