Class AbstractGraphQLWebsocketHandler

java.lang.Object
io.smallrye.graphql.websocket.AbstractGraphQLWebsocketHandler
All Implemented Interfaces:
GraphQLWebsocketHandler
Direct Known Subclasses:
GraphQLTransportWSSubprotocolHandler, GraphQLWSSubprotocolHandler

public abstract class AbstractGraphQLWebsocketHandler extends Object implements GraphQLWebsocketHandler
  • Field Details

    • LOG

      protected static final org.jboss.logging.Logger LOG
    • executionService

      protected final ExecutionService executionService
    • session

      protected final GraphQLWebSocketSession session
    • connectionInitialized

      protected final AtomicBoolean connectionInitialized
    • connectionAckMessage

      protected final String connectionAckMessage
    • activeOperations

      protected final Map<String,org.reactivestreams.Subscriber<graphql.ExecutionResult>> activeOperations
    • keepAliveSender

      protected final io.smallrye.mutiny.subscription.Cancellable keepAliveSender
  • Constructor Details

  • Method Details

    • onMessage

      public void onMessage(String text)
      Description copied from interface: GraphQLWebsocketHandler
      Called when a message arrives and needs to be handled. Implementation of this method MUST NOT block the calling thread!
      Specified by:
      onMessage in interface GraphQLWebsocketHandler
    • onThrowable

      public void onThrowable(Throwable t)
      Specified by:
      onThrowable in interface GraphQLWebsocketHandler
    • onClose

      public void onClose()
      Specified by:
      onClose in interface GraphQLWebsocketHandler
    • onEnd

      public void onEnd()
      Specified by:
      onEnd in interface GraphQLWebsocketHandler
    • sendConnectionAckMessage

      protected void sendConnectionAckMessage() throws IOException
      Throws:
      IOException
    • onOperationRequest

      protected void onOperationRequest(jakarta.json.JsonObject message)
    • sendCancelMessage

      protected void sendCancelMessage(jakarta.json.JsonObject message)
    • onMessage

      protected abstract void onMessage(jakarta.json.JsonObject message)
    • sendErrorMessage

      protected abstract void sendErrorMessage(String operationId, ExecutionResponse executionResponse) throws IOException
      Throws:
      IOException
    • closeDueToConnectionNotInitialized

      protected abstract void closeDueToConnectionNotInitialized()
    • getPingMessage

      protected abstract String getPingMessage()
    • getContext

      public Map<String,Object> getContext()