graphql.kickstart.servlet.subscriptions.WebSocketSubscriptionSession Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of graphql-java-servlet Show documentation
Show all versions of graphql-java-servlet Show documentation
relay.js-compatible GraphQL servlet
package graphql.kickstart.servlet.subscriptions;
import graphql.kickstart.execution.subscriptions.DefaultSubscriptionSession;
import graphql.kickstart.execution.subscriptions.GraphQLSubscriptionMapper;
import java.util.Map;
import jakarta.websocket.Session;
public class WebSocketSubscriptionSession extends DefaultSubscriptionSession {
private final Session session;
public WebSocketSubscriptionSession(GraphQLSubscriptionMapper mapper, Session session) {
super(mapper);
this.session = session;
}
@Override
public boolean isOpen() {
return session.isOpen();
}
@Override
public Map getUserProperties() {
return session.getUserProperties();
}
@Override
public String getId() {
return session.getId();
}
@Override
public Session unwrap() {
return session;
}
}