本文整理了Java中gov.nist.toolkit.installation.server.Installation.getTestSessions()
方法的一些代码示例,展示了Installation.getTestSessions()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Installation.getTestSessions()
方法的具体详情如下:
包路径:gov.nist.toolkit.installation.server.Installation
类名称:Installation
方法名:getTestSessions
暂无
代码示例来源:origin: usnistgov/iheos-toolkit2
public boolean testSessionExists(TestSession testSession) {
return getTestSessions().contains(testSession);
}
代码示例来源:origin: usnistgov/iheos-toolkit2
public static void generateCurrentlyConfiguredListeners() throws IOException, NoSimException, ClassNotFoundException {
for (TestSession testSession : Installation.instance().getTestSessions()) {
List<SimId> simIds = new SimDb().getSimulatorIdsforActorType(ActorType.REGISTRY, testSession);
generateListeners(simIds);
}
}
代码示例来源:origin: usnistgov/iheos-toolkit2
public static void terminateCurrentlyConfiguredListeners() throws IOException, NoSimException {
for (TestSession testSession : Installation.instance().getTestSessions()) {
List<SimId> simIds = new SimDb().getSimulatorIdsforActorType(ActorType.REGISTRY, testSession);
for (SimId simId : simIds)
ListenerFactory.terminate(simId.toString());
}
}
代码示例来源:origin: usnistgov/iheos-toolkit2
public static void onServiceStart() {
try {
for (TestSession testSession : Installation.instance().getTestSessions()) {
List<SimId> simIds = SimDb.getAllSimIds(testSession);
for (SimId simId : simIds) {
BaseHttpActorSimulator sim = (BaseHttpActorSimulator) RuntimeManager.getHttpSimulatorRuntime(simId);
if (sim == null) continue;
SimulatorConfig asc = GenericSimulatorFactory.getSimConfig(simId);
sim.init(asc);
sim.onServiceStart(asc);
}
}
} catch (Exception e) {
logger.fatal(ExceptionUtil.exception_details(e));
}
}
代码示例来源:origin: usnistgov/iheos-toolkit2
private static void onServiceStart() {
try {
for (TestSession testSession : Installation.instance().getTestSessions()) {
List<SimId> simIds = SimDb.getAllSimIds(testSession);
for (SimId simId : simIds) {
BaseActorSimulator baseSim = (BaseActorSimulator) RuntimeManager.getSimulatorRuntime(simId);
if (baseSim == null) continue;
if (baseSim instanceof BaseDsActorSimulator) {
BaseDsActorSimulator sim = (BaseDsActorSimulator) baseSim;
DsSimCommon dsSimCommon = null;
SimulatorConfig asc = GenericSimulatorFactory.getSimConfig(simId);
sim.init(dsSimCommon, asc);
sim.onServiceStart(asc);
}
}
}
} catch (Exception e) {
logger.fatal(ExceptionUtil.exception_details(e));
}
}
代码示例来源:origin: usnistgov/iheos-toolkit2
public static void onServiceStop() {
try {
for (TestSession testSession : Installation.instance().getTestSessions()) {
List<SimId> simIds = new SimDb().getAllSimIds(testSession);
for (SimId simId : simIds) {
BaseHttpActorSimulator sim = (BaseHttpActorSimulator) RuntimeManager.getHttpSimulatorRuntime(simId);
if (sim == null) continue;
SimulatorConfig asc = GenericSimulatorFactory.getSimConfig(simId);
sim.init(asc);
sim.onServiceStop(asc);
}
}
} catch (Exception e) {
logger.fatal(ExceptionUtil.exception_details(e));
}
}
代码示例来源:origin: usnistgov/iheos-toolkit2
private static void onServiceStop() {
try {
for (TestSession testSession : Installation.instance().getTestSessions()) {
List<SimId> simIds = SimDb.getAllSimIds(testSession);
for (SimId simId : simIds) {
BaseActorSimulator baseSim = (BaseActorSimulator) RuntimeManager.getSimulatorRuntime(simId);
if (baseSim == null) continue;
if (baseSim instanceof BaseDsActorSimulator) {
BaseDsActorSimulator sim = (BaseDsActorSimulator) baseSim;
DsSimCommon dsSimCommon = null;
SimulatorConfig asc = GenericSimulatorFactory.getSimConfig(simId);
sim.init(dsSimCommon, asc);
sim.onServiceStop(asc);
}
}
}
} catch (Exception e) {
logger.fatal(ExceptionUtil.exception_details(e));
}
}
代码示例来源:origin: usnistgov/iheos-toolkit2
public void init(ServletConfig sConfig) {
configuredHost = Installation.instance().propertyServiceManager().getToolkitHost();
configuredPort = Installation.instance().propertyServiceManager().getToolkitPort();
configuredTlsPort = Installation.instance().propertyServiceManager().getToolkitTlsPort();
configuredProxyPort = Installation.instance().propertyServiceManager().getProxyPort();
configuredContext = Installation.instance().getServletContextName();
if (configuredContext.startsWith("/"))
configuredContext = configuredContext.substring(1);
logger.info("Reconfiguring Simulators to host " + getConfiguredHost() + " port " + getConfiguredPort() + " context " + getConfiguredContext());
logger.info("Reconfiguring simulators in " + Installation.instance().getTestSessions());
for (TestSession testSession : Installation.instance().getTestSessions()) {
for (SimId simId : SimDb.getAllSimIds(testSession)) {
try {
reconfigure(simId);
} catch (Throwable e) {
logger.fatal("Reconfigure of sim " + simId + " failed - " + ExceptionUtil.exception_details(e));
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!