com.infomaximum.cluster.graphql.executor.subscription.GraphQLSubscribeEvent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cluster-graphql Show documentation
Show all versions of cluster-graphql Show documentation
Library for creating a light cluster
package com.infomaximum.cluster.graphql.executor.subscription;
import com.infomaximum.cluster.graphql.remote.graphql.subscribe.RControllerGraphQLSubscribe;
import com.infomaximum.cluster.graphql.struct.GSubscribeEvent;
import com.infomaximum.cluster.graphql.struct.subscribe.SubscribeKey;
import com.infomaximum.cluster.struct.Component;
public class GraphQLSubscribeEvent {
private final Component component;
public GraphQLSubscribeEvent(Component component) {
this.component = component;
}
public void pushEvent(GSubscribeEvent subscribeEvent) {
GSubscribeEvent.SubscribeValue subscribeValue = subscribeEvent.getSubscribeValue();
SubscribeKey subscribeKey = new SubscribeKey(component, subscribeValue.subscribeKey);
for (RControllerGraphQLSubscribe controller : component.getRemotes().getControllers(RControllerGraphQLSubscribe.class)) {
controller.pushEvent(subscribeKey, subscribeValue.value);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy