All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.infomaximum.cluster.graphql.executor.subscription.GraphQLSubscribeEvent Maven / Gradle / Ivy

There is a newer version: 1.1.11
Show newest version
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