Class WebsocketFactory

  • All Implemented Interfaces:
    org.eclipse.jetty.util.component.Graceful

    public class WebsocketFactory
    extends java.lang.Object
    implements org.eclipse.jetty.util.component.Graceful
    Helper class to bridge the gap between Jetty's Graceful interface and the jakarta implementation of the supported grpc websocket transports.

    This type is not an Endpoint, so only one instance of this can create and shutdown many endpoints.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Graceful

        org.eclipse.jetty.util.component.Graceful.Shutdown, org.eclipse.jetty.util.component.Graceful.ThrowingRunnable
    • Constructor Summary

      Constructors 
      Constructor Description
      WebsocketFactory​(java.util.function.Supplier<io.grpc.servlet.web.websocket.GrpcWebsocket> factory, org.eclipse.jetty.websocket.jakarta.server.internal.JakartaWebSocketServerContainer jettyWebsocketContainer)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      jakarta.websocket.Endpoint create()  
      boolean isShutdown()  
      java.util.concurrent.CompletableFuture<java.lang.Void> shutdown()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WebsocketFactory

        public WebsocketFactory​(java.util.function.Supplier<io.grpc.servlet.web.websocket.GrpcWebsocket> factory,
                                org.eclipse.jetty.websocket.jakarta.server.internal.JakartaWebSocketServerContainer jettyWebsocketContainer)
    • Method Detail

      • create

        public jakarta.websocket.Endpoint create()
      • shutdown

        public java.util.concurrent.CompletableFuture<java.lang.Void> shutdown()
        Specified by:
        shutdown in interface org.eclipse.jetty.util.component.Graceful
      • isShutdown

        public boolean isShutdown()
        Specified by:
        isShutdown in interface org.eclipse.jetty.util.component.Graceful