public class ApolloWSHandlerImpl extends Object implements ApolloWSHandler
| Constructor and Description |
|---|
ApolloWSHandlerImpl(graphql.GraphQL graphQL,
ApolloWSOptions options) |
| Modifier and Type | Method and Description |
|---|---|
ApolloWSHandler |
connectionHandler(Handler<ServerWebSocket> connectionHandler)
Customize the connection
Handler. |
ApolloWSHandler |
dataLoaderRegistry(Function<ApolloWSMessage,org.dataloader.DataLoaderRegistry> factory)
Customize the
DataLoaderRegistry. |
ApolloWSHandler |
endHandler(Handler<ServerWebSocket> endHandler)
Customize the end
Handler. |
void |
handle(RoutingContext routingContext)
Something has happened, so handle it.
|
ApolloWSHandler |
messageHandler(Handler<ApolloWSMessage> messageHandler)
Customize the message
Handler. |
ApolloWSHandler |
queryContext(Function<ApolloWSMessage,Object> factory)
Customize the query context object.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreate, createpublic ApolloWSHandlerImpl(graphql.GraphQL graphQL,
ApolloWSOptions options)
public ApolloWSHandler connectionHandler(Handler<ServerWebSocket> connectionHandler)
ApolloWSHandlerHandler.
This handler will be called at the beginning of each websocket connection.connectionHandler in interface ApolloWSHandlerpublic ApolloWSHandler messageHandler(Handler<ApolloWSMessage> messageHandler)
ApolloWSHandlerHandler.
This handler will be called for each ApolloWSMessage received.messageHandler in interface ApolloWSHandlerpublic ApolloWSHandler endHandler(Handler<ServerWebSocket> endHandler)
ApolloWSHandlerHandler.
This handler will be called at the end of each websocket connection.endHandler in interface ApolloWSHandlerpublic ApolloWSHandler queryContext(Function<ApolloWSMessage,Object> factory)
ApolloWSHandlerfactory method will be invoked for each incoming GraphQL request.queryContext in interface ApolloWSHandlerpublic ApolloWSHandler dataLoaderRegistry(Function<ApolloWSMessage,org.dataloader.DataLoaderRegistry> factory)
ApolloWSHandlerDataLoaderRegistry.
The provided factory method will be invoked for each incoming GraphQL request.dataLoaderRegistry in interface ApolloWSHandlerpublic void handle(RoutingContext routingContext)
Handlerhandle in interface Handler<RoutingContext>routingContext - the event to handleCopyright © 2020. All rights reserved.