Class NodeSubscriptions
-
- All Implemented Interfaces:
-
com.expediagroup.graphql.server.operations.Subscription
public final class NodeSubscriptions<T extends Object, P extends Position<out P>> implements Subscription
Exposes alchemist it.unibo.alchemist.model.Nodes as GraphQL subscriptions.
-
-
Constructor Summary
Constructors Constructor Description NodeSubscriptions(Environment<T, P> environment)
-
Method Summary
Modifier and Type Method Description final Flow<NodeSurrogate<T>>
node(Integer nodeId)
Returns a Flow with the updated value of the it.unibo.alchemist.boundary.graphql.schema.model.surrogates.NodeSurrogate with the given Id. final Flow<NeighborhoodSurrogate<T>>
neighborhood(Integer nodeId)
Returns a Flow with the updated value of the it.unibo.alchemist.boundary.graphql.schema.model.surrogates.NeighborhoodSurrogate with the given node as a part of the neighborhood. -
-
Constructor Detail
-
NodeSubscriptions
NodeSubscriptions(Environment<T, P> environment)
- Parameters:
environment
- the environment.
-
-
Method Detail
-
node
final Flow<NodeSurrogate<T>> node(Integer nodeId)
Returns a Flow with the updated value of the it.unibo.alchemist.boundary.graphql.schema.model.surrogates.NodeSurrogate with the given Id.
- Parameters:
nodeId
- the node Id.
-
neighborhood
final Flow<NeighborhoodSurrogate<T>> neighborhood(Integer nodeId)
Returns a Flow with the updated value of the it.unibo.alchemist.boundary.graphql.schema.model.surrogates.NeighborhoodSurrogate with the given node as a part of the neighborhood.
- Parameters:
nodeId
- the node Id.- Returns:
the neighborhood of the node with the given Id.
-
-
-
-