Class MockDispatcher

    • Method Detail

      • releaseResources

        public void releaseResources()
        Description copied from class: Dispatcher
        Release any per-connection resources that must outlive in-flight dispatches.

        Called after the HTTP server has stopped accepting new connections, so it is safe to tear down state that an in-flight handler might otherwise touch (for example a WebSocket session's ScheduledExecutorService used to deliver onOpen messages).

        Note: Vert.x HttpServer.close() does not strictly wait for every in-flight WebSocket upgrade to deliver its onOpen callback before completing, so callers that schedule onto resources released here must still be defensive against a shutdown that races with a late upgrade (see WebSocketSession.send).

        The default implementation is a no-op.

        Overrides:
        releaseResources in class Dispatcher