public <T extends Container> EngineRef getEngineRefForContainer(Class<T> type) { for (EngineRef engine : _getEngineRefs()) { T container = null; try { container = type.cast(engine.getContainerInfo().getContainer()); } catch (Exception e) { // ignore, wrong container } if (container!=null) { return engine; } } return null; }
public <T extends Container> EngineRef getEngineRefForContainer(Class<T> type) { for (EngineRef engine : _getEngineRefs()) { T container = null; try { container = type.cast(engine.getContainerInfo().getContainer()); } catch (Exception e) { // ignore, wrong container } if (container!=null) { return engine; } } return null; }
public void stop(Logger logger) { if (getDeployer()!=null) { Inhabitant i = registry.habitat.getInhabitantByType(getDeployer().getClass()); if (i!=null) { i.release(); } } if (getContainer()!=null) { Inhabitant i = registry.habitat.getInhabitantByType(getContainer().getClass()); if (i!=null) { i.release(); } } registry.removeContainer(this); if (logger.isLoggable(Level.FINE)) { logger.fine("Container " + getContainer().getName() + " stopped"); } } }
webSniffer.getContainersNames()[0]) != null) { containerRegistry.getContainer( webSniffer.getContainersNames()[0]).getContainer(); } else { try { info.getContainer(); if (logger.isLoggable(Level.INFO)) { logger.log(Level.INFO, mStartContainerDone,
public void stop(Logger logger) { if (getDeployer()!=null) { ServiceHandle<?> i = registry.habitat.getServiceHandle(getDeployer().getClass()); if (i!=null) { i.destroy(); } } if (container != null && container.isActive()) { container.destroy(); } registry.removeContainer(this); if (logger.isLoggable(Level.FINE)) { logger.fine("Container " + getContainer().getName() + " stopped"); } } }
containerRegistry.getContainer(sniffer.getContainersNames()[0]).getContainer(); } else { final long startTime = System.currentTimeMillis(); LOGGER.log(Level.FINE, "Got container, deployer is {0}", info.getDeployer()); info.getContainer(); LOGGER.log(Level.INFO, KernelLoggerInfo.snifferAdapterContainerStarted, new Object[]{sniffer.getModuleType(), System.currentTimeMillis() - startTime});
ApplicationContainer appCtr = deployer.load(engineInfo.getContainer(), context); if (appCtr==null) { String msg = "Cannot load application in " + engineInfo.getContainer().getName() + " container"; logger.fine(msg); continue;
ApplicationContainer appCtr = deployer.load(engineInfo.getContainer(), context); if (appCtr==null) { String msg = "Cannot load application in " + engineInfo.getContainer().getName() + " container"; logger.fine(msg); continue;
report.failure(logger, "Got a null deployer out of the " + engineInfo.getContainer().getClass() + " container, is it annotated with @Service ?"); return null;
Container container; try { container = engineInfo.getContainer(); } catch(Exception e) { logger.log(Level.SEVERE, KernelLoggerInfo.cantStartContainer,
report.failure(logger, "Got a null deployer out of the " + engineInfo.getContainer().getClass() + " container, is it annotated with @Service ?"); return null;
Container container; try { container = engineInfo.getContainer(); } catch(Exception e) { logger.log(Level.SEVERE, KernelLoggerInfo.cantStartContainer,
":" + connectorModule.getModuleDefinition().getVersion()); container.addProperty(localStrings.getLocalString("implementation", "Implementation"), engineInfo.getContainer().getClass().toString()); boolean atLeastOne = false; for (Application app : applications.getApplications()) {