Class NameAppNameHandler

    • Constructor Detail

      • NameAppNameHandler

        public NameAppNameHandler​(String userName,
                                  String appName)
        Creates a new handler for NameCallback and AppNameCallback.
        Parameters:
        userName - The unique name of the user to log on. This must not be null nor an empty/blank string. Note that this name is case-sensitive!
        appName - The application name for which to log on. This may be null.
    • Method Detail

      • handle

        public Callback[] handle​(Callback[] callbacks)
                          throws IOException,
                                 UnsupportedCallbackException
        Description copied from interface: AFCallbackHandler
        This method is similar to CallbackHandler.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.
        When called remotely, the provided callbacks are copies of the server-side objects. When changing these objects, the changes are not reflected on server side. Therefore these objects (or rather copies of them) need to be returned.
        Specified by:
        handle in interface AFCallbackHandler
        Parameters:
        callbacks - The callbacks to be handled by this callback handler.
        Returns:
        All the callbacks that should be handled by this callback handler. Just return the complete array of callbacks. Do not skip any callbacks, for instance the ones that the callback handler did not handle!
        Throws:
        IOException - If an input or output error occurs, an IOException will be thrown.
        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.