Class InternalSignal
java.lang.Object
com.vaadin.hilla.signals.internal.InternalSignal
A proxy for a signal instance that allows subscribing to it and submitting
commands.
This is internal API and should not be used outside the framework.
-
Constructor Summary
ConstructorsConstructorDescriptionInternalSignal(com.vaadin.signals.AbstractSignal<?> signal, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.signals.Idid()voidSubmits an commandJson to the signal and notifies subscribers about the change of the signal value.reactor.core.publisher.Flux<com.fasterxml.jackson.databind.JsonNode>Subscribes to the signal.
-
Constructor Details
-
InternalSignal
public InternalSignal(com.vaadin.signals.AbstractSignal<?> signal, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Details
-
id
public com.vaadin.signals.Id id() -
subscribe
public reactor.core.publisher.Flux<com.fasterxml.jackson.databind.JsonNode> subscribe(String clientSignalId) Subscribes to the signal.- Parameters:
clientSignalId- the clientSignalId associated with the signal to update- Returns:
- a Flux of JSON events
-
submit
public void submit(String clientSignalId, com.fasterxml.jackson.databind.node.ObjectNode commandJson) Submits an commandJson to the signal and notifies subscribers about the change of the signal value.- Parameters:
clientSignalId- the clientSignalId associated with the signal to updatecommandJson- the command to submit in JSON format
-