Interface ModelService
public interface ModelService
Client service to
Example:
See usages for existing application types.
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 Summary
Modifier and TypeMethodDescription<T> void
addModelListener
(ModelType<T> type, ModelListener<T> listener) Adds the givenlistener
to benotified
on every model change.<T> void
removeModelListener
(ModelType<T> type, ModelListener<T> listener) Removes the givenlistener
.
-
Method Details
-
addModelListener
Adds the givenlistener
to benotified
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
Removes the givenlistener
. 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
-