Package org.saf.application

Source Code of org.saf.application.AbstractSMSCChannelController

package org.saf.application;

import org.saf.cdrs.CdrsWriterAgent;
import org.saf.settings.CdrsSettings;
import org.saf.settings.SMPPSettings;
import org.saf.settings.SMSCChannelSettings;
import org.saf.shutdownhook.ShutdownHookListener;
import org.saf.smppagent.AbstractSMPPAgentFacade;
import org.saf.snmp.SNMPManager;


public abstract class AbstractSMSCChannelController extends AbstractController
  implements ShutdownHookListener {
 
  protected CdrsWriterAgent cdrsWriterAgent = null;
  protected AbstractSMPPAgentFacade smppAgentFacade = null
  private String channel = null;
 
  @Override
  public void run() {
    super.run();
    this.cdrsWriterAgent.start();
    this.smppAgentFacade.start();
  }
 
  public Priority getPriority() {
    return Priority.HIGH;
  }
 
  public void shutdownHookReceived() {
    safeStop();
    logger.info("Safe stop for SMPP channel " + this.channel);
    this.smppAgentFacade.safeStop();
 
 
  public String getChannel() {
    return this.channel;
  }

  protected AbstractSMSCChannelController(String channel,
      AbstractSMPPAgentFacade smppAgentFacade, CdrsSettings cdrSettings,
      SMSCChannelSettings channelSettings, SMPPSettings smppSetting,
      SNMPManager snmpManager) {
    init(channel, smppAgentFacade, cdrSettings,
        channelSettings, smppSetting, snmpManager);
 
 
  private void init(String channel, AbstractSMPPAgentFacade smppAgentFacade,
      CdrsSettings cdrSettings, SMSCChannelSettings channelSettings,
      SMPPSettings smppSetting, SNMPManager snmpManager) {
    this.smppAgentFacade = smppAgentFacade;
    this.cdrsWriterAgent =
      new CdrsWriterAgent(channel, cdrSettings, channelSettings,
          smppSetting, snmpManager);
    this.channel = channel;
 

}
TOP

Related Classes of org.saf.application.AbstractSMSCChannelController

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.