logger.info("Connection closed with [{}]", channelName);
closeChannelAndCancelTimer();
}
protected SmppSessionConfiguration createSessionConfiguration(BaseBind bindRequest) {
SmppSessionConfiguration sessionConfiguration = new SmppSessionConfiguration();
sessionConfiguration.setName("SmppServerSession." + bindRequest.getSystemId() + "." + bindRequest.getSystemType());
sessionConfiguration.setSystemId(bindRequest.getSystemId());
sessionConfiguration.setPassword(bindRequest.getPassword());
sessionConfiguration.setSystemType(bindRequest.getSystemType());
sessionConfiguration.setBindTimeout(server.getConfiguration().getBindTimeout());
sessionConfiguration.setAddressRange(bindRequest.getAddressRange());
sessionConfiguration.setHost(ChannelUtil.getChannelRemoteHost(channel));
sessionConfiguration.setPort(ChannelUtil.getChannelRemotePort(channel));
sessionConfiguration.setInterfaceVersion(bindRequest.getInterfaceVersion());
LoggingOptions loggingOptions = new LoggingOptions();
loggingOptions.setLogPdu(true);
sessionConfiguration.setLoggingOptions(loggingOptions);
// handle all 3 types...
if (bindRequest instanceof BindTransceiver) {
sessionConfiguration.setType(SmppBindType.TRANSCEIVER);
} else if (bindRequest instanceof BindReceiver) {
sessionConfiguration.setType(SmppBindType.RECEIVER);
} else if (bindRequest instanceof BindTransmitter) {
sessionConfiguration.setType(SmppBindType.TRANSMITTER);
}
// new default options set from server config
sessionConfiguration.setWindowSize(server.getConfiguration().getDefaultWindowSize());
sessionConfiguration.setWindowWaitTimeout(server.getConfiguration().getDefaultWindowWaitTimeout());
sessionConfiguration.setWindowMonitorInterval(server.getConfiguration().getDefaultWindowMonitorInterval());
sessionConfiguration.setRequestExpiryTimeout(server.getConfiguration().getDefaultRequestExpiryTimeout());
sessionConfiguration.setCountersEnabled(server.getConfiguration().isDefaultSessionCountersEnabled());
return sessionConfiguration;
}