Class InternalSignal

java.lang.Object
com.vaadin.hilla.signals.internal.InternalSignal

public class InternalSignal extends Object
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

    Constructors
    Constructor
    Description
    InternalSignal(com.vaadin.signals.AbstractSignal<?> signal, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.vaadin.signals.Id
    id()
     
    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.
    reactor.core.publisher.Flux<com.fasterxml.jackson.databind.JsonNode>
    subscribe(String clientSignalId)
    Subscribes to the signal.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 update
      commandJson - the command to submit in JSON format