public interface ResourceBuilderModel extends Identifiable
Modifier and Type | Method and Description |
---|---|
List<? extends EventModel<?>> |
announceEvents()
this method is called to register for what Events it wants to provide Resources.
|
List<? extends ResourceModel> |
announceResources()
This method is called to register what resources the object provides.
|
List<ResourceModel> |
provideResource(List<? extends ResourceModel> resources,
Optional<EventModel> event)
This method is called when an object wants to get a Resource.
|
getID, isOwner
List<? extends ResourceModel> announceResources()
List<? extends EventModel<?>> announceEvents()
The Event has to be in the following format: It should contain only one Descriptor and and one Resource with the ID "description", which contains an description of the Event.
List<ResourceModel> provideResource(List<? extends ResourceModel> resources, Optional<EventModel> event)
Don't use the Resources provided as arguments, they are just the requests. There is a timeout after 1 second.
resources
- a list of resources without dataevent
- if an event caused the action, it gets passed. It can also be null.Copyright © 2016. All rights reserved.