Search in sources :

Example 1 with SmppBindType

use of com.cloudhopper.smpp.SmppBindType in project smscgateway by RestComm.

the class SmppParametersForm method setData.

public void setData(SmppSimulatorParameters data) {
    this.data = data;
    this.tbWindowSize.setText(((Integer) data.getWindowSize()).toString());
    this.tbHost.setText(data.getHost());
    this.tbPort.setText(((Integer) data.getPort()).toString());
    this.tbSystemId.setText(data.getSystemId());
    this.tbPassword.setText(data.getPassword());
    this.tbConnectTimeout.setText(((Long) data.getConnectTimeout()).toString());
    this.tbRequestExpiryTimeout.setText(((Long) data.getRequestExpiryTimeout()).toString());
    this.tbWindowMonitorInterval.setText(((Long) data.getWindowMonitorInterval()).toString());
    this.tbAddressRange.setText(data.getAddressRange());
    this.cbBindType.removeAllItems();
    SmppBindType[] vall = SmppBindType.values();
    SmppBindType dv = null;
    for (SmppBindType v : vall) {
        this.cbBindType.addItem(v);
        if (v == data.getBindType())
            dv = v;
    }
    if (dv != null)
        this.cbBindType.setSelectedItem(dv);
    this.cbSmppSessionType.removeAllItems();
    SmppSession.Type[] vall2 = SmppSession.Type.values();
    SmppSession.Type dv2 = null;
    for (SmppSession.Type v : vall2) {
        this.cbSmppSessionType.addItem(v);
        if (v == data.getSmppSessionType())
            dv2 = v;
    }
    if (dv2 != null)
        this.cbSmppSessionType.setSelectedItem(dv2);
}
Also used : SmppBindType(com.cloudhopper.smpp.SmppBindType) SmppSession(com.cloudhopper.smpp.SmppSession) SmppBindType(com.cloudhopper.smpp.SmppBindType)

Example 2 with SmppBindType

use of com.cloudhopper.smpp.SmppBindType in project smscgateway by RestComm.

the class DefaultSmsRoutingRule method getEsmeClusterName.

/*
	 * (non-Javadoc)
	 * 
	 * @see org.mobicents.smsc.smpp.SmsRoutingRule#getSystemId(byte, byte,
	 * java.lang.String)
	 */
@Override
public String getEsmeClusterName(int ton, int npi, String address, String name, int networkId) {
    // for (Esme esme : this.esmeManagement.getEsmes()) {
    for (FastList.Node<Esme> n = this.esmeManagement.getEsmes().head(), end = this.esmeManagement.getEsmes().tail(); (n = n.getNext()) != end; ) {
        Esme esme = n.getValue();
        SmppBindType sessionBindType = esme.getSmppBindType();
        SmppSession.Type smppSessionType = esme.getSmppSessionType();
        if (sessionBindType == SmppBindType.TRANSCEIVER || (sessionBindType == SmppBindType.RECEIVER && smppSessionType == SmppSession.Type.SERVER) || (sessionBindType == SmppBindType.TRANSMITTER && smppSessionType == SmppSession.Type.CLIENT)) {
            if (!(esme.getName().equals(name)) && esme.getNetworkId() == networkId && esme.isRoutingAddressMatching(ton, npi, address)) {
                return esme.getClusterName();
            }
        }
    }
    return null;
}
Also used : SmppSession(com.cloudhopper.smpp.SmppSession) SmppBindType(com.cloudhopper.smpp.SmppBindType) Esme(org.restcomm.smpp.Esme) FastList(javolution.util.FastList)

Aggregations

SmppBindType (com.cloudhopper.smpp.SmppBindType)2 SmppSession (com.cloudhopper.smpp.SmppSession)2 FastList (javolution.util.FastList)1 Esme (org.restcomm.smpp.Esme)1