Class Connection

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class Connection
    extends java.lang.Object
    implements java.io.Closeable
    • Constructor Summary

      Constructors 
      Constructor Description
      Connection​(HttpClient client, java.lang.String url)  
    • Constructor Detail

      • Connection

        public Connection​(HttpClient client,
                          java.lang.String url)
    • Method Detail

      • send

        public <X> java.util.concurrent.CompletableFuture<X> send​(Command<X> command)
      • sendAndWait

        public <X> X sendAndWait​(Command<X> command,
                                 java.time.Duration timeout)
      • addListener

        public <X> void addListener​(Event<X> event,
                                    java.util.function.Consumer<X> handler)
      • clearListener

        public <X> void clearListener​(Event<X> event)
      • clearListeners

        public void clearListeners()
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable