Interface GraphQLWSHandlerBuilder
-
public interface GraphQLWSHandlerBuilderA builder forGraphQLWSHandlerinstances.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description GraphQLWSHandlerBuilderbeforeExecute(Handler<ExecutionInputBuilderWithContext<Message>> beforeExecuteHandler)Set a callback to invoke before executing a GraphQL query.GraphQLWSHandlerbuild()GraphQLWSHandlerBuilderonConnectionInit(Handler<ConnectionInitEvent> connectionInitHandler)Customize the connection initHandler.GraphQLWSHandlerBuilderonMessage(Handler<Message> messageHandler)Customize the messageHandler.GraphQLWSHandlerBuilderonSocketEnd(Handler<ServerWebSocket> endHandler)Customize the endHandler.GraphQLWSHandlerBuilderwith(GraphQLWSOptions options)Change theGraphQLWSOptionsto use.
-
-
-
Method Detail
-
with
GraphQLWSHandlerBuilder with(GraphQLWSOptions options)
Change theGraphQLWSOptionsto use.- Returns:
- a reference to this, so the API can be used fluently
-
onConnectionInit
GraphQLWSHandlerBuilder onConnectionInit(Handler<ConnectionInitEvent> connectionInitHandler)
Customize the connection initHandler. This handler will be called when theMessageType.CONNECTION_INITmessage is received.- Returns:
- a reference to this, so the API can be used fluently
-
beforeExecute
GraphQLWSHandlerBuilder beforeExecute(Handler<ExecutionInputBuilderWithContext<Message>> beforeExecuteHandler)
Set a callback to invoke before executing a GraphQL query.- Parameters:
beforeExecuteHandler- the callback to invoke- Returns:
- a reference to this, so the API can be used fluently
-
onMessage
GraphQLWSHandlerBuilder onMessage(Handler<Message> messageHandler)
- Returns:
- a reference to this, so the API can be used fluently
-
onSocketEnd
GraphQLWSHandlerBuilder onSocketEnd(Handler<ServerWebSocket> endHandler)
Customize the endHandler. This handler will be called at the end of each websocket connection.- Returns:
- a reference to this, so the API can be used fluently
-
build
GraphQLWSHandler build()
- Returns:
- a new instance of
GraphQLWSHandler
-
-