/** * Return true if the given application is registered with the server associated with the given * port and this server is running; false otherwise. The model name is used to identify the * application - only one instance of a model may be registered to a server. (Note that multiple * instances of a model are possible by different servers on different ports.) * * @param fullModelName The full name of the model * @param portNumber The port this application would be hosted on * @return true if the given application is registered with the server associated with the given * port and this server is running; false otherwise. */ public boolean isRunning(String fullModelName, int portNumber) { // Check if a server is associated with this port WebServerUtilities server = null; for (WebServerUtilities theServer : _servers) { if (theServer.getPortNumber() == portNumber) { server = theServer; break; } } if (server != null) { // FIXME: Use just model name, or whole application info object? if (server.isHostingModel(fullModelName) && server.isRunning()) { return true; } } return false; }