Package ie.omk.smpp.message

Examples of ie.omk.smpp.message.BindResp


    connector.doStart();

    // open connection and bind
    Connection connection = connect(4444);

    BindResp bindResp = connection.bind(Connection.TRANSMITTER, "test", "test", null);
    Assert.assertNotNull(bindResp);
    Assert.assertEquals(bindResp.getCommandStatus(), Response.INVALID_SYSTEM_ID.getCommandStatus());

    connector.doStop();
  }
View Full Code Here


    SmppServerConnector connector = new SmppServerConnector(configuration);
    connector.configure();
    connector.doStart();

    Connection connection = connect(4444);
    BindResp bindResp = connection.bind(Connection.TRANSMITTER, "test", "other", null);
    Assert.assertNotNull(bindResp);
    Assert.assertEquals(bindResp.getCommandStatus(), Response.INVALID_PASSWORD.getCommandStatus());

    connector.doStop();
  }
View Full Code Here

    return connection;
  }

  private void bind(Connection connection, int type, String systemId, String password, String systemType) throws InvalidParameterValueException, AlreadyBoundException, VersionException, SMPPProtocolException, IllegalArgumentException, IOException {
    BindResp bindResp = connection.bind(Connection.TRANSMITTER, "test", "test", null);

    Assert.assertNotNull(bindResp);
    Assert.assertEquals(bindResp.getCommandStatus(), 0);
  }
View Full Code Here

        connection.addObserver(messageListener);

        connection.bind(getConnectionType(configuration), configuration.getSystemId(), configuration.getPassword(), configuration.getSystemType(),
            getBindTON(), getBindNPI(), null);

        BindResp bindResp = messageListener.getBindResponse(configuration.getBindTimeout());
        if (bindResp == null || bindResp.getCommandStatus() != 0) {
          // close the link if no response
          if (link != null) {
            try { link.close(); } catch (Exception f) {}
          }
          throw new Exception("Bind Response failed: " + bindResp);
View Full Code Here

TOP

Related Classes of ie.omk.smpp.message.BindResp

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.