Interface SubscriptionClient
- All Known Implementing Classes:
SubscriptionClientReactiveImpl
public interface SubscriptionClient
This interface allows the application to interact with the subscription, once it has subscribed to it. The currently
only available action is
This instance also allows to retrieve the
unsubscribe()
.This instance also allows to retrieve the
WebSocketSession
that is connected, if the application needs to
interact with it.- Author:
- etienne-sf
-
Method Summary
Modifier and Type Method Description 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.12void
unsubscribe()
Allows the client application to unsubscribe from a previously subscribed subscription.
-
Method Details
-
unsubscribe
Allows 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
-