PluginMetadataManager pluginMetadataManager = PluginContainer
.getInstance().getPluginManager().getMetadataManager();
ResourceType appServerResourceType = pluginMetadataManager.getType(
APPLICATION_SERVER_RESOURCE_NAME, PLUGIN_NAME);
InventoryManager inventoryManager = PluginContainer.getInstance()
.getInventoryManager();
Set<Resource> appServers = inventoryManager
.getResourcesWithType(appServerResourceType);
if (appServers.size() != 1) {
throw new IllegalStateException(
"Expected to find exactly 1 AS5 server, but found "