public class DocksModel extends Observable implements org.osgi.service.event.EventHandler
Constructor and Description |
---|
DocksModel(org.osgi.framework.BundleContext context)
Constructor of the dock model
|
Modifier and Type | Method and Description |
---|---|
Collection<DockModel> |
getAllDocks()
Returns a collection of all docks currently known in this dock model
|
DockModel |
getBestFreeDock()
Gets the next best free dock from the list of unused docks.
|
DockModel |
getDockById(String dockId)
Return the dock status model with of the dock with the given ID
|
List<DockModel> |
getLocalDocks()
Return a list of all local docks
|
List<DockModel> |
getRemoteDocks()
Return a list of all remote docks
|
void |
handleEvent(org.osgi.service.event.Event event)
Method to handle OSGi Events sent by the SimulationDock to inform about status updates
(non-Javadoc).
|
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
public DocksModel(org.osgi.framework.BundleContext context)
context
- The bundle context of the plugin which contains the dock model. Used to interact
with OSGi's event service and remote OSGipublic Collection<DockModel> getAllDocks()
public DockModel getBestFreeDock() throws InterruptedException
InterruptedException
- Execption when the thread is terminatedpublic List<DockModel> getLocalDocks()
public List<DockModel> getRemoteDocks()
public void handleEvent(org.osgi.service.event.Event event)
handleEvent
in interface org.osgi.service.event.EventHandler
EventHandler.handleEvent(org.osgi.service.event.Event)