Interface ModelService


public interface ModelService
Client service to add or remove ModelListener. (only available inside java-client!)
Example:
  servicesBroker.getService(ModelService.class).addModelListener(MyModel.TYPE, new MyModelListener());

See usages for existing application types.
Since:
4.2.426
See Also:
  • Method Details

    • addModelListener

      <T> void addModelListener(ModelType<T> type, ModelListener<T> listener)
      Adds the given listener to be notified on every model change.
      Type Parameters:
      T - model interface; ensures type safety between model and listener.
      Parameters:
      type - model type.
      listener - to add.
      Since:
      4.2.426
    • removeModelListener

      <T> void removeModelListener(ModelType<T> type, ModelListener<T> listener)
      Removes the given listener. Calls with unknown listeners will be ignored.
      Type Parameters:
      T - model interface; ensures type safety between model and listener.
      Parameters:
      type - model type.
      listener - to remove.
      Since:
      4.2.426