Interface OperationHandler

All Known Implementing Classes:
AbstractOperationHandler

public interface OperationHandler
Classes that implement this interface are used to handle operations from a remote object. Implementations must apply the operations to the corresponding target object.

It is recommended to extend AbstractOperationHandler rather than to implement this interface.

Since:
2.0
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    handleCall(String method, JsonObject parameters)
    Handles a call operation from the remote object.
    void
    handleNotify(String event, JsonObject properties)
    Handles a notify operation from the remote object.
    void
    handleSet(JsonObject properties)
    Handles a set operation from the remote object.
  • Method Details

    • handleSet

      void handleSet(JsonObject properties)
      Handles a set operation from the remote object. With a set operation, the remote object informs the receiver that one or more properties have changed their values. The implementation of this method must apply the new property values to the target object in a suitable order.
      Parameters:
      properties - a map with the properties
      Since:
      2.1
    • handleCall

      void handleCall(String method, JsonObject parameters)
      Handles a call operation from the remote object. With a call operation, the remote object instructs the receiver to call a method on the target object. The method call may be parameterized with the given properties.
      Parameters:
      method - the name of the method to call
      parameters - the parameters for the method call, may be empty but never null
      Since:
      2.1
    • handleNotify

      void handleNotify(String event, JsonObject properties)
      Handles a notify operation from the remote object. With a notify operation, the remote object notifies the receiver that an event has occurred. An implementation of this method must notify the corresponding listeners attached to the target object.
      Parameters:
      event - the name of the event that occurred
      properties - the event properties, may be empty but never null
      Since:
      2.1