Package com.logica.smpp.pdu

Examples of com.logica.smpp.pdu.BindRequest


    TCPIPConnection connection = new TCPIPConnection (myHost, myPort);
    connection.setReceiveTimeout (cReceiveTimeout);
    mySession = new Session (connection);

    // configure the bind request
    BindRequest request = null;
    if (access.equals (SmppAccessType.eTransmitter)) {
      request = new BindTransmitter ();
    }
    else if (access.equals (SmppAccessType.eReceiver)) {
      request = new BindReceiver ();
    }
    else if (access.equals (SmppAccessType.eTransciever)) {
      request = new BindTransciever ();
    }
    else {
      myLog.error ("open :access type {} not recognissed.", access);
      return false;
    }

    try {
      request.setSystemId (myUsername);
      request.setPassword (myPassword);
      request.setSystemType (system.getCode ());
    }
    catch (WrongLengthOfStringException exc) {
      myLog.error ("open: failed setting parameters for request", exc);
      return false;
    }
    request.setInterfaceVersion ((byte)0x34);
    request.setAddressRange (addressRange);

    myLog.debug("open: bind pdu: {}", request.debugString ());
    return bind (request, listener);
  }
View Full Code Here


        try{
            this.socket = SocketUtility.createSocket(this.settings, false);
            if(this.socket != null) {
              Connection conn = new TCPIPConnection(this.socket);
              this.session = new Session(conn);
              BindRequest request = getBindRequest();
              Response response = this.session.bind(request);
              if(response.getCommandStatus() == Data.ESME_ROK){
                  ret = true;
                  this.session.getReceiver().setQueueWaitTimeout(1000);
              }
View Full Code Here

        }
    }
   
    private BindRequest getBindRequest()
            throws WrongLengthOfStringException{
        BindRequest request = new BindReceiver();
        request.setSystemId(this.settings.getSystemId());
        request.setPassword(this.settings.getPassword());
        request.setSystemType(this.settings.getSystemType());
        request.setAddressRange( this.settings.getAddrTon(),
                this.settings.getAddrNpi(), this.settings.getAddressRange());
        return request;           
    }
View Full Code Here

          try {
              this.socket = SocketUtility.createSocket(this.settings, true);
              if(this.socket != null) {
                Connection conn = new TCPIPConnection(this.socket);
                this.session = new Session(conn);
                BindRequest request = getBindRequest();
                Response response = this.session.bind(request);
                if(response.getCommandStatus() == Data.ESME_ROK) {
                    ret = true;
                }
                else {
View Full Code Here

  }
 
    private BindRequest getBindRequest()
        throws WrongLengthOfStringException {
    
      BindRequest request = new BindTransmitter();

     request.setSystemId(this.settings.getSystemId());
    request.setPassword(this.settings.getPassword());
    request.setSystemType(this.settings.getSystemType());
    request.setAddressRange( this.settings.getAddrTon(),
            this.settings.getAddrNpi(), this.settings.getAddressRange());
    return request;           
 
View Full Code Here

TOP

Related Classes of com.logica.smpp.pdu.BindRequest

Copyright © 2018 www.massapicom. 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.