use of org.mobicents.ss7.management.console.ShellExecutor in project smscgateway by RestComm.
the class SmscService method start.
@Override
public void start(StartContext context) throws StartException {
log.info("Starting SmscService");
this.smscManagementMBean = initSmscManagementMBean(smppService.getValue().getSmppManagementMBean());
this.statsProviderJmx = new SmscStatProviderJmx(ss7Service.getValue().getSs7Management());
if (shellExecutorExists()) {
this.schedulerMBean = initSchedulerMBean();
this.smscShellExecutor = initSmscShellExecutor();
shellExecutorMBean = null;
try {
FastList<ShellExecutor> shellExecutors = new FastList<ShellExecutor>();
shellExecutors.add(smscShellExecutor);
shellExecutors.add(ss7Service.getValue().getBeanTcapExecutor());
shellExecutors.add(ss7Service.getValue().getBeanM3uaShellExecutor());
shellExecutors.add(ss7Service.getValue().getBeanSctpShellExecutor());
shellExecutors.add(ss7Service.getValue().getBeanSccpExecutor());
shellExecutors.add(smppService.getValue().getSmppShellExecutor());
String address = getPropertyString("ShellExecutor", "address", "127.0.0.1");
int port = getPropertyInt("ShellExecutor", "port", 3435);
String securityDomain = getPropertyString("ShellExecutor", "securityDomain", "jmx-console");
shellExecutorMBean = new ShellServerWildFly(schedulerMBean, shellExecutors);
shellExecutorMBean.setAddress(address);
shellExecutorMBean.setPort(port);
shellExecutorMBean.setSecurityDomain(securityDomain);
} catch (Exception e) {
throw new StartException("ShellExecutor MBean creating is failed: " + e.getMessage(), e);
}
// starting
try {
schedulerMBean.start();
shellExecutorMBean.start();
} catch (Exception e) {
throw new StartException("MBeans starting is failed: " + e.getMessage(), e);
}
}
try {
statsProviderJmx.start();
} catch (Exception e) {
throw new StartException("Failed to start smsc statistics privider: " + e.getMessage(), e);
}
}
Aggregations