Package jadex.bridge

Class TimeoutResultListener<E>

    • Field Detail

      • notified

        protected boolean notified
        The timeout occurred flag.
      • timer

        protected java.lang.Object timer
        The timer.
      • timeout

        protected long timeout
        The timeout.
      • realtime

        protected boolean realtime
        The realtime flag.
      • message

        protected java.lang.Object message
        The timeout message.
      • undone

        protected boolean undone
        Flag if undone methods should be used.
    • Constructor Detail

      • TimeoutResultListener

        public TimeoutResultListener​(long timeout,
                                     IExternalAccess exta)
        Create a new listener.
      • TimeoutResultListener

        public TimeoutResultListener​(long timeout,
                                     IExternalAccess exta,
                                     boolean realtime,
                                     java.lang.Object message,
                                     IResultListener<E> listener)
        Create a new listener.
    • Method Detail

      • resultAvailable

        public void resultAvailable​(E result)
        Called when the result is available.
        Specified by:
        resultAvailable in interface IResultListener<E>
        Parameters:
        result - The result.
      • exceptionOccurred

        public void exceptionOccurred​(java.lang.Exception exception)
        Called when an exception occurred.
        Specified by:
        exceptionOccurred in interface IResultListener<E>
        Parameters:
        exception - The exception.
      • exceptionOccurredIfUndone

        public void exceptionOccurredIfUndone​(java.lang.Exception exception)
        Called when an exception occurred.
        Specified by:
        exceptionOccurredIfUndone in interface IUndoneResultListener<E>
        Parameters:
        exception - The exception.
      • cancel

        public void cancel()
        Cancel the timeout.
      • initTimer

        protected void initTimer()
      • createTimerTask

        protected java.util.TimerTask createTimerTask​(java.lang.Exception debug)
      • timeoutOccurred

        public void timeoutOccurred​(TimeoutException te)
        Can be overridden, e.g. when no listener is used.