private void unregisterMBean() { if (configuration == null) { return; } if (configuration.isJmxEnabled()) { // register the this queue manager as an mbean try { ObjectName name = new ObjectName(configuration.getJmxDomain() + ":name=" + configuration.getName()); ManagementFactory.getPlatformMBeanServer().unregisterMBean(name); } catch (Exception e) { // log the error, but don't throw an exception for this datasource logger.error("Unable to unregister DefaultSmppServerMXBean [{}]", configuration.getName(), e); } } }
private void unregisterMBean() { if (configuration == null) { return; } if (configuration.isJmxEnabled()) { // register the this queue manager as an mbean try { ObjectName name = new ObjectName(configuration.getJmxDomain() + ":name=" + configuration.getName()); ManagementFactory.getPlatformMBeanServer().unregisterMBean(name); } catch (Exception e) { // log the error, but don't throw an exception for this datasource logger.error("Unable to unregister DefaultSmppServerMXBean [{}]", configuration.getName(), e); } } }
private void unregisterMBean() { if (configuration == null) { return; } if (configuration.isJmxEnabled()) { // register the this queue manager as an mbean try { ObjectName name = new ObjectName(configuration.getJmxDomain() + ":name=" + configuration.getName()); ManagementFactory.getPlatformMBeanServer().unregisterMBean(name); } catch (Exception e) { // log the error, but don't throw an exception for this datasource logger.error("Unable to unregister DefaultSmppServerMXBean [{}]", configuration.getName(), e); } } }
private void registerMBean() { if (configuration == null) { return; } if (configuration.isJmxEnabled()) { // register the this queue manager as an mbean try { ObjectName name = new ObjectName(configuration.getJmxDomain() + ":name=" + configuration.getName()); ManagementFactory.getPlatformMBeanServer().registerMBean(this, name); } catch (Exception e) { // log the error, but don't throw an exception for this datasource logger.error("Unable to register DefaultSmppServerMXBean [{}]", configuration.getName(), e); } } }
@Override public void destroy() { this.bindTimer.cancel(); stop(); this.serverBootstrap.releaseExternalResources(); this.serverBootstrap = null; this.writeTimeoutTimer.stop(); unregisterMBean(); logger.info("{} destroyed on SMPP port [{}]", configuration.getName(), configuration.getPort()); }
@Override public void destroy() { this.bindTimer.cancel(); stop(); this.serverBootstrap.releaseExternalResources(); this.serverBootstrap = null; this.writeTimeoutTimer.stop(); unregisterMBean(); logger.info("{} destroyed on SMPP port [{}]", configuration.getName(), configuration.getPort()); }
@Override public void destroy() { this.bindTimer.cancel(); stop(); this.serverBootstrap.releaseExternalResources(); this.serverBootstrap = null; this.writeTimeoutTimer.stop(); unregisterMBean(); logger.info("{} destroyed on SMPP port [{}]", configuration.getName(), configuration.getPort()); }
@Override public void stop() { if (this.channels.size() > 0) { logger.info("{} currently has [{}] open child channel(s) that will be closed as part of stop()", configuration.getName(), this.channels.size()); } // close all channels still open within this session "bootstrap" this.channels.close().awaitUninterruptibly(); // clean up all external resources if (this.serverChannel != null) { this.serverChannel.close().awaitUninterruptibly(); this.serverChannel = null; } logger.info("{} stopped at {}:{}", configuration.getName(), configuration.getHost(), configuration.getPort()); }
@Override public void destroy() { this.bindTimer.cancel(); stop(); this.serverBootstrap.releaseExternalResources(); this.serverBootstrap = null; this.writeTimeoutTimer.stop(); unregisterMBean(); logger.info("{} destroyed on SMPP port [{}]", configuration.getName(), configuration.getPort()); }
@Override public void stop() { if (this.channels.size() > 0) { logger.info("{} currently has [{}] open child channel(s) that will be closed as part of stop()", configuration.getName(), this.channels.size()); } // close all channels still open within this session "bootstrap" this.channels.close().awaitUninterruptibly(); // clean up all external resources if (this.serverChannel != null) { this.serverChannel.close().awaitUninterruptibly(); this.serverChannel = null; } logger.info("{} stopped at {}:{}", configuration.getName(), configuration.getHost(), configuration.getPort()); }
@Override public void stop() { if (this.channels.size() > 0) { logger.info("{} currently has [{}] open child channel(s) that will be closed as part of stop()", configuration.getName(), this.channels.size()); } // close all channels still open within this session "bootstrap" this.channels.close().awaitUninterruptibly(); // clean up all external resources if (this.serverChannel != null) { this.serverChannel.close().awaitUninterruptibly(); this.serverChannel = null; } logger.info("{} stopped at {}:{}", configuration.getName(), configuration.getHost(), configuration.getPort()); }
@Override public void stop() { if (this.channels.size() > 0) { logger.info("{} currently has [{}] open child channel(s) that will be closed as part of stop()", configuration.getName(), this.channels.size()); } // close all channels still open within this session "bootstrap" this.channels.close().awaitUninterruptibly(); // clean up all external resources if (this.serverChannel != null) { this.serverChannel.close().awaitUninterruptibly(); this.serverChannel = null; } logger.info("{} stopped at {}:{}", configuration.getName(), configuration.getHost(), configuration.getPort()); }
@Override public void start() throws SmppChannelException { if (isDestroyed()) { throw new SmppChannelException("Unable to start: server is destroyed"); } try { serverChannel = this.serverBootstrap.bind(new InetSocketAddress(configuration.getHost(), configuration.getPort())); logger.info("{} started at {}:{}", configuration.getName(), configuration.getHost(), configuration.getPort()); } catch (ChannelException e) { throw new SmppChannelException(e.getMessage(), e); } }
@Override public void start() throws SmppChannelException { if (isDestroyed()) { throw new SmppChannelException("Unable to start: server is destroyed"); } try { serverChannel = this.serverBootstrap.bind(new InetSocketAddress(configuration.getHost(), configuration.getPort())); logger.info("{} started at {}:{}", configuration.getName(), configuration.getHost(), configuration.getPort()); } catch (ChannelException e) { throw new SmppChannelException(e.getMessage(), e); } }
@Override public void start() throws SmppChannelException { if (isDestroyed()) { throw new SmppChannelException("Unable to start: server is destroyed"); } try { serverChannel = this.serverBootstrap.bind(new InetSocketAddress(configuration.getHost(), configuration.getPort())); logger.info("{} started at {}:{}", configuration.getName(), configuration.getHost(), configuration.getPort()); } catch (ChannelException e) { throw new SmppChannelException(e.getMessage(), e); } }
@Override public void start() throws SmppChannelException { if (isDestroyed()) { throw new SmppChannelException("Unable to start: server is destroyed"); } try { serverChannel = this.serverBootstrap.bind(new InetSocketAddress(configuration.getHost(), configuration.getPort())); logger.info("{} started at {}:{}", configuration.getName(), configuration.getHost(), configuration.getPort()); } catch (ChannelException e) { throw new SmppChannelException(e.getMessage(), e); } }
protected void destroySession(Long sessionId, DefaultSmppSession session) { // session destroyed, now pass it upstream counters.incrementSessionDestroyedAndGet(); decrementSessionSizeCounters(session); serverHandler.sessionDestroyed(sessionId, session); // unregister this session as an mbean if (configuration.isJmxEnabled()) { session.unregisterMBean(configuration.getJmxDomain() + ":type=" + configuration.getName() + "Sessions,name=" + sessionId); } }
protected void destroySession(Long sessionId, DefaultSmppSession session) { // session destroyed, now pass it upstream counters.incrementSessionDestroyedAndGet(); decrementSessionSizeCounters(session); serverHandler.sessionDestroyed(sessionId, session); // unregister this session as an mbean if (configuration.isJmxEnabled()) { session.unregisterMBean(configuration.getJmxDomain() + ":type=" + configuration.getName() + "Sessions,name=" + sessionId); } }
protected void destroySession(Long sessionId, DefaultSmppSession session) { // session destroyed, now pass it upstream counters.incrementSessionDestroyedAndGet(); decrementSessionSizeCounters(session); serverHandler.sessionDestroyed(sessionId, session); // unregister this session as an mbean if (configuration.isJmxEnabled()) { session.unregisterMBean(configuration.getJmxDomain() + ":type=" + configuration.getName() + "Sessions,name=" + sessionId); } }
protected void destroySession(Long sessionId, DefaultSmppSession session) { // session destroyed, now pass it upstream counters.incrementSessionDestroyedAndGet(); decrementSessionSizeCounters(session); serverHandler.sessionDestroyed(sessionId, session); // unregister this session as an mbean if (configuration.isJmxEnabled()) { session.unregisterMBean(configuration.getJmxDomain() + ":type=" + configuration.getName() + "Sessions,name=" + sessionId); } }