Interface SubscriptionClient
-
- All Known Implementing Classes:
SubscriptionClientReactiveImpl
public interface SubscriptionClientThis interface allows the application to interact with the subscription, once it has subscribed to it. The currently only available action isunsubscribe().
This instance also allows to retrieve theWebSocketSessionthat is connected, if the application needs to interact with it.- Author:
- etienne-sf
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.springframework.web.reactive.socket.WebSocketSessiongetSession()Allow to retrieve theWebSocketSession, when the implementation is based on Spring Reactive, which is the default since release 1.12voidunsubscribe()Allows the client application to unsubscribe from a previously subscribed subscription.
-
-
-
Method Detail
-
unsubscribe
void unsubscribe() throws GraphQLRequestExecutionExceptionAllows the client application to unsubscribe from a previously subscribed subscription. No more notification will be sent for this subscription.
This will free resources on both the client and the server.- Throws:
GraphQLRequestExecutionException
-
getSession
org.springframework.web.reactive.socket.WebSocketSession getSession()
Allow to retrieve theWebSocketSession, when the implementation is based on Spring Reactive, which is the default since release 1.12- Returns:
- The
WebSocketSession, if the Spring reactive implementation is used. Or null otherwise
-
-