Interface WebSocketTracesInterceptor


public interface WebSocketTracesInterceptor
This interface must be implemented as a CDI bean by an extension that needs to collect WebSockets traces.
  • Method Details

    • onConnectionOpened

      Map<String,Object> onConnectionOpened(String route, EndpointKind endpointKind)
      Called when a WebSocket connection is opened. Any data that should be shared between other events (like onConnectionClosed(WebSocketEndpointContext)) must be returned as a context data.
      Parameters:
      route - endpoint route
      endpointKind - whether invoked endpoint is a server endpoint or a client endpoint
      Returns:
      context data or null (when no context data are required)
    • onConnectionOpeningFailed

      void onConnectionOpeningFailed(Throwable cause, String route, EndpointKind endpointKind, Map<String,Object> connectionOpenedContext)
      Called when an opening of a WebSocket connection failed.
      Parameters:
      cause - Throwable
      route - endpoint route
      endpointKind - whether invoked endpoint is a server endpoint or a client endpoint
      connectionOpenedContext - context data produced by the onConnectionOpened(String, EndpointKind)
    • onConnectionClosed

      void onConnectionClosed(WebSocketEndpointContext context)
      Called when a WebSocket connection is opened.
      Parameters:
      context - WebSocketEndpointContext
    • onConnectionClosingFailed

      void onConnectionClosingFailed(Throwable throwable, WebSocketEndpointContext context)
      Called when a closing of a WebSocket connection failed.
      Parameters:
      throwable - Throwable
      context - endpoint context