Package org.smpp.pdu

Examples of org.smpp.pdu.BindResponse


                if (commandId == Data.BIND_TRANSMITTER
                    || commandId == Data.BIND_RECEIVER
                    || commandId == Data.BIND_TRANSCEIVER) {
                    //commandStatus = checkIdentity((BindRequest)request);
                    // firstly generate proper bind response
                    BindResponse bindResponse =
                        (BindResponse) request.getResponse();
                    bindResponse.setSystemId(SYSTEM_ID);
                    // and send it to the client via serverResponse
                    serverResponse(bindResponse);
                    // success => bound
                    bound = true;
                } else {
View Full Code Here


     * @throws MessageException if there was a problem binding to the SMSC
     */
    protected void bind(Session session) throws MessageException {

        BindRequest request = new BindTransmitter();
        BindResponse response;
        LOGGER.info("logica-smpp-version-is",
                new Byte(request.getInterfaceVersion()));
       
        // Send the request.
        if(LOGGER.isDebugEnabled()) {
            LOGGER.debug("Bind request " + request.debugString());
        }

        try {
            request.setSystemId(SMSCUser);
            request.setPassword(SMSCPassword);
            request.setSystemType(null);
            request.setInterfaceVersion((byte) 0x34);

            if("async".equals(SMSCBindType)){               
                response = session.bind(request, new SMSCResponseListener());
            } else {
                response = session.bind(request);
            }

            if (response != null) {
                if (response.getCommandStatus() == Data.ESME_ROK) {
                    LOGGER.debug("Successfully bound to SMSC.");
                } else {
                    LOGGER.error("Unexpected response to bind. " +
                            "Response is " + response.debugString());
                }
            } else {
                LOGGER.debug("BindResponse was null when SMSCBindType was " +
                        SMSCBindType);
            }
View Full Code Here

TOP

Related Classes of org.smpp.pdu.BindResponse

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.