Class GraphQLBrokerSubProtocolHandler

java.lang.Object
org.activiti.cloud.services.notifications.graphql.ws.transport.GraphQLBrokerSubProtocolHandler
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationEventPublisherAware, org.springframework.web.socket.messaging.SubProtocolHandler

public class GraphQLBrokerSubProtocolHandler extends Object implements org.springframework.web.socket.messaging.SubProtocolHandler, org.springframework.context.ApplicationEventPublisherAware
  • Field Details

  • Constructor Details

    • GraphQLBrokerSubProtocolHandler

      public GraphQLBrokerSubProtocolHandler(String destination)
  • Method Details

    • getSupportedProtocols

      public List<String> getSupportedProtocols()
      Specified by:
      getSupportedProtocols in interface org.springframework.web.socket.messaging.SubProtocolHandler
    • handleMessageFromClient

      public void handleMessageFromClient(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.WebSocketMessage<?> message, org.springframework.messaging.MessageChannel outputChannel) throws Exception
      Specified by:
      handleMessageFromClient in interface org.springframework.web.socket.messaging.SubProtocolHandler
      Throws:
      Exception
    • handleMessageToClient

      public void handleMessageToClient(org.springframework.web.socket.WebSocketSession session, org.springframework.messaging.Message<?> message)
      Specified by:
      handleMessageToClient in interface org.springframework.web.socket.messaging.SubProtocolHandler
    • resolveSessionId

      public String resolveSessionId(org.springframework.messaging.Message<?> message)
      Specified by:
      resolveSessionId in interface org.springframework.web.socket.messaging.SubProtocolHandler
    • afterSessionStarted

      public void afterSessionStarted(org.springframework.web.socket.WebSocketSession session, org.springframework.messaging.MessageChannel outputChannel) throws Exception
      Specified by:
      afterSessionStarted in interface org.springframework.web.socket.messaging.SubProtocolHandler
      Throws:
      Exception
    • afterSessionEnded

      public void afterSessionEnded(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.CloseStatus closeStatus, org.springframework.messaging.MessageChannel outputChannel) throws Exception
      Specified by:
      afterSessionEnded in interface org.springframework.web.socket.messaging.SubProtocolHandler
      Throws:
      Exception
    • sendErrorMessage

      protected void sendErrorMessage(org.springframework.web.socket.WebSocketSession session, Throwable error, GraphQLMessage message)
      Invoked to send an ERROR frame to the client.
    • setApplicationEventPublisher

      public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
      Specified by:
      setApplicationEventPublisher in interface org.springframework.context.ApplicationEventPublisherAware
    • setLoggingPeriod

      public void setLoggingPeriod(long period)
      Set the frequency for logging information at INFO level in milliseconds. If set 0 or less than 0, the logging task is cancelled.

      By default this property is set to 5 minutes (5 * 60 * 1000).

    • getLoggingPeriod

      public long getLoggingPeriod()
      Return the configured logging period frequency in milliseconds.