E - Listener typepublic abstract class SubscribableModel<E extends Listener<? extends Model>> extends Model<E>
| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
logger |
| Constructor and Description |
|---|
SubscribableModel(String path,
ModelType type,
PathfinderServices services)
Constructs a subcribable model.
|
| Modifier and Type | Method and Description |
|---|---|
JsonObject |
getMessageHeader(String type)
Returns the header of the message to send to the pathfinder server.
|
void |
routeSubscribe()
Subscribes to route updates from the server.
|
void |
routeUnsubscribe()
Unsubcribes from route updates from the server.
|
void |
subscribe()
Subscribes to the models updates from the server.
|
void |
unsubscribe()
Unsubcribes from updates from the server.
|
createValueJson, getChildPath, getModelType, getName, getParentCluster, getParentPath, getPath, getPathName, getServices, isConnected, notifyUpdate, route, setConnected, updateFieldsaddListener, getListeners, removeListenerpublic SubscribableModel(String path, ModelType type, PathfinderServices services)
path - of the model to subscribe to.type - of the model.services - a pathfinder services object.public JsonObject getMessageHeader(String type)
type - of the messagepublic void subscribe()
public void unsubscribe()
public void routeSubscribe()
public void routeUnsubscribe()