Class SubscriptionClientReactiveImpl
java.lang.Object
com.graphql_java_generator.client.SubscriptionClientReactiveImpl
- All Implemented Interfaces:
SubscriptionClient
public class SubscriptionClientReactiveImpl extends java.lang.Object implements SubscriptionClient
Default implementation for the
SubscriptionClient interface.- Author:
- etienne-sf
-
Constructor Summary
Constructors Constructor Description SubscriptionClientReactiveImpl(reactor.core.Disposable disposable, org.springframework.web.reactive.socket.WebSocketSession session) -
Method Summary
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.
-
Constructor Details
-
SubscriptionClientReactiveImpl
public SubscriptionClientReactiveImpl(reactor.core.Disposable disposable, org.springframework.web.reactive.socket.WebSocketSession session)- Parameters:
disposable- TheDisposableThat allows to close the underlyingFlux, that receive the subscription notificationssession- The connectedWebSocketSession
-
-
Method Details
-
unsubscribe
Description copied from interface:SubscriptionClientAllows 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.- Specified by:
unsubscribein interfaceSubscriptionClient- Throws:
GraphQLRequestExecutionException
-
getSession
public org.springframework.web.reactive.socket.WebSocketSession getSession()Description copied from interface:SubscriptionClientAllow to retrieve theWebSocketSession, when the implementation is based on Spring Reactive, which is the default since release 1.12- Specified by:
getSessionin interfaceSubscriptionClient- Returns:
- The
WebSocketSession, if the Spring reactive implementation is used. Or null otherwise
-