Class SharedBlockingCallback.Blocker

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, Callback, Invocable
    Enclosing class:
    SharedBlockingCallback

    @Deprecated(since="2021-05-27")
    public class SharedBlockingCallback.Blocker
    extends java.lang.Object
    implements Callback, java.io.Closeable
    Deprecated.
    The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.
    A Closeable Callback. Uses the auto close mechanism to check block has been called OK.

    Implements Callback because calls to this callback do not blocak, rather they wakeup the thread that is blocked in block()

    • Method Detail

      • failed

        public void failed​(java.lang.Throwable cause)
        Deprecated.
        Description copied from interface: Callback

        Callback invoked when the operation fails.

        Specified by:
        failed in interface Callback
        Parameters:
        cause - the reason for the operation failure
      • block

        public void block()
                   throws java.io.IOException
        Deprecated.
        Block until the Callback has succeeded or failed and after the return leave in the state to allow reuse. This is useful for code that wants to repeatable use a FutureCallback to convert an asynchronous API to a blocking API.
        Throws:
        java.io.IOException - if exception was caught during blocking, or callback was cancelled
      • close

        public void close()
        Deprecated.
        Check the Callback has succeeded or failed and after the return leave in the state to allow reuse.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
      • toString

        public java.lang.String toString()
        Deprecated.
        Overrides:
        toString in class java.lang.Object