Package org.smpp.pdu

Examples of org.smpp.pdu.Response


        //this.messageStore = messageStore;
        // this.users = users;
    }

    public void clientRequest(org.smpp.pdu.Request request) {
        Response response;
        //        int commandStatus;
        int commandId = request.getCommandId();
        try {
            System.out.println("client request: " + request.debugString());
            if (!bound) { // the first PDU must be bound request
                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 {
                    // the request isn't a bound req and this is wrong: if not
                    // bound, then the server expects bound PDU
                    if (request.canResponse()) {
                        // get the response
                        response = request.getResponse();
                        response.setCommandStatus(Data.ESME_RINVBNDSTS);
                        // and send it to the client via serverResponse
                        serverResponse(response);
                    } else {
                        // cannot respond to a request which doesn't have
                        // a response :-(
View Full Code Here

TOP

Related Classes of org.smpp.pdu.Response

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.