Interface GraphQLWSHandlerBuilder
-
public interface GraphQLWSHandlerBuilder
A builder forGraphQLWSHandler
instances.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description GraphQLWSHandlerBuilder
beforeExecute(Handler<ExecutionInputBuilderWithContext<Message>> beforeExecuteHandler)
Set a callback to invoke before executing a GraphQL query.GraphQLWSHandler
build()
GraphQLWSHandlerBuilder
onConnectionInit(Handler<ConnectionInitEvent> connectionInitHandler)
Customize the connection initHandler
.GraphQLWSHandlerBuilder
onMessage(Handler<Message> messageHandler)
Customize the messageHandler
.GraphQLWSHandlerBuilder
onSocketEnd(Handler<ServerWebSocket> endHandler)
Customize the endHandler
.GraphQLWSHandlerBuilder
with(GraphQLWSOptions options)
Change theGraphQLWSOptions
to use.
-
-
-
Method Detail
-
with
GraphQLWSHandlerBuilder with(GraphQLWSOptions options)
Change theGraphQLWSOptions
to 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_INIT
message 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
-
-