Package org.jsmpp.bean

Examples of org.jsmpp.bean.BindResp


     
      BindCommandTask task = new BindCommandTask(pduSender(), bindType,
                systemId, password, systemType, interfaceVersion, addrTon,
                addrNpi, addressRange);
     
      BindResp resp = (BindResp)executeSendCommand(task, timeout);
    return resp.getSystemId();
  }
View Full Code Here


        BindCommandTask task = new BindCommandTask(pduSender(), bindType,
                systemId, password, systemType, interfaceVersion, addrTon,
                addrNpi, addressRange);

        BindResp resp = (BindResp)executeSendCommand(task, timeout);
        return new BindResult(resp.getSystemId(), resp.getOptionalParameters());
    }
View Full Code Here

        } catch (PDUStringException e) {
            fail("Failed composing bind response", e);
        }
       
        try {
            BindResp resp = decomposer.bindResp(b);
            assertEquals(resp.getCommandLength(), b.length);
            assertEquals(resp.getCommandId(), bindType.responseCommandId());
            assertEquals(resp.getCommandStatus(), SMPPConstant.STAT_ESME_ROK);
            assertEquals(resp.getSequenceNumber(), 1);
            assertEquals(resp.getSystemId(), systemId);
        } catch (PDUStringException e) {
            fail("Failed decomposing bind response", e);
        }
    }
View Full Code Here

     * (non-Javadoc)
     *
     * @see org.jsmpp.util.PDUDecomposer#bindResp(byte[])
     */
    public BindResp bindResp(byte[] b) throws PDUStringException {
        BindResp resp = new BindResp();
        SequentialBytesReader reader = new SequentialBytesReader(b);
        assignHeader(resp, reader);
        if (resp.getCommandLength() > 16 && resp.getCommandStatus() == 0) {
            resp.setSystemId(reader.readCString());
            StringValidator.validateString(resp.getSystemId(),
                    StringParameter.SYSTEM_ID);

            resp.setOptionalParameters(readOptionalParameters(reader));
        }
        return resp;
    }
View Full Code Here

        BindCommandTask task = new BindCommandTask(pduSender(), bindType,
                systemId, password, systemType, interfaceVersion, addrTon,
                addrNpi, addressRange);

        BindResp resp = (BindResp)executeSendCommand(task, timeout);
        return new BindResult(resp.getSystemId(), resp.getOptionalParameters());
    }
View Full Code Here

                logger.debug("Bind Response header ("
                        + pduHeader.getCommandLength() + ", "
                        + pduHeader.getCommandIdAsHex() + ", "
                        + IntUtil.toHexString(pduHeader.getCommandStatus())
                        + ", " + pduHeader.getSequenceNumber() + ")");
                BindResp resp = pduDecomposer.bindResp(pdu);
                pendingResp.done(resp);
            } catch (PDUStringException e) {
                String message = "Failed decomposing submit_sm_resp";
                logger.error(message, e);
                responseHandler.sendGenerickNack(e.getErrorCode(), pduHeader
View Full Code Here

     
      BindCommandTask task = new BindCommandTask(pduSender(), bindType,
                systemId, password, systemType, interfaceVersion, addrTon,
                addrNpi, addressRange);
     
      BindResp resp = (BindResp)executeSendCommand(task, timeout);
      OptionalParameter.Sc_interface_version sc_version = resp.getOptionalParameter(Sc_interface_version.class);
      if(sc_version != null) {
        logger.info("Other side reports smpp interface version {}", sc_version);
      }
       
    return resp.getSystemId();
  }
View Full Code Here

TOP

Related Classes of org.jsmpp.bean.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.