Class CallbackUtil

  • public final class CallbackUtil
    extends Object
    Helper utility methods for callback handlers.
    David M. Lloyd
    • Constructor Detail

      • CallbackUtil

        private CallbackUtil()
    • Method Detail

      • isOptional

        public static boolean isOptional​(Callback callback)
        Determine whether a callback is optional.
        callback - the callback
        true if it is optional, false if it is not optional or optionality could not be determined
      • unsupported

        public static void unsupported​(Callback callback)
                                throws UnsupportedCallbackException
        A utility to handle a callback which is unsupported. Optional callbacks will be ignored, otherwise the exception will be thrown. In the case of optional callbacks, this method will return.
        callback - the callback which is not supported
        UnsupportedCallbackException - if the callback is not optional