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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterSessionEnded(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.CloseStatus closeStatus, org.springframework.messaging.MessageChannel outputChannel) voidafterSessionStarted(org.springframework.web.socket.WebSocketSession session, org.springframework.messaging.MessageChannel outputChannel) longReturn the configured logging period frequency in milliseconds.voidhandleMessageFromClient(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.WebSocketMessage<?> message, org.springframework.messaging.MessageChannel outputChannel) voidhandleMessageToClient(org.springframework.web.socket.WebSocketSession session, org.springframework.messaging.Message<?> message) resolveSessionId(org.springframework.messaging.Message<?> message) protected voidsendErrorMessage(org.springframework.web.socket.WebSocketSession session, Throwable error, GraphQLMessage message) Invoked to send an ERROR frame to the client.voidsetApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher) voidsetLoggingPeriod(long period) Set the frequency for logging information at INFO level in milliseconds.
-
Field Details
-
GRAPHQL_WS
- See Also:
-
MINIMUM_WEBSOCKET_MESSAGE_SIZE
public static final int MINIMUM_WEBSOCKET_MESSAGE_SIZE- See Also:
-
-
Constructor Details
-
GraphQLBrokerSubProtocolHandler
-
-
Method Details
-
getSupportedProtocols
- Specified by:
getSupportedProtocolsin interfaceorg.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:
handleMessageFromClientin interfaceorg.springframework.web.socket.messaging.SubProtocolHandler- Throws:
Exception
-
handleMessageToClient
public void handleMessageToClient(org.springframework.web.socket.WebSocketSession session, org.springframework.messaging.Message<?> message) - Specified by:
handleMessageToClientin interfaceorg.springframework.web.socket.messaging.SubProtocolHandler
-
resolveSessionId
- Specified by:
resolveSessionIdin interfaceorg.springframework.web.socket.messaging.SubProtocolHandler
-
afterSessionStarted
public void afterSessionStarted(org.springframework.web.socket.WebSocketSession session, org.springframework.messaging.MessageChannel outputChannel) throws Exception - Specified by:
afterSessionStartedin interfaceorg.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:
afterSessionEndedin interfaceorg.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:
setApplicationEventPublisherin interfaceorg.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.
-