Examples of BaseBind


Examples of com.cloudhopper.smpp.pdu.BaseBind

            return;
        }

        // delegate any bind request to the server handler
        // variables we track for a successful bind request
        BaseBind bindRequest = (BaseBind)pdu;

        // create a default session configuration based on this bind request
        SmppSessionConfiguration sessionConfiguration = createSessionConfiguration(bindRequest);

        // assign a new identifier for this session
View Full Code Here

Examples of com.cloudhopper.smpp.pdu.BaseBind

        // clean up all external resources
        this.clientBootstrap.releaseExternalResources();
    }

    protected BaseBind createBindRequest(SmppSessionConfiguration config) throws UnrecoverablePduException {
        BaseBind bind = null;
        if (config.getType() == SmppBindType.TRANSCEIVER) {
            bind = new BindTransceiver();
        } else if (config.getType() == SmppBindType.RECEIVER) {
            bind = new BindReceiver();
        } else if (config.getType() == SmppBindType.TRANSMITTER) {
            bind = new BindTransmitter();
        } else {
            throw new UnrecoverablePduException("Unable to convert SmppSessionConfiguration into a BaseBind request");
        }
        bind.setSystemId(config.getSystemId());
        bind.setPassword(config.getPassword());
        bind.setSystemType(config.getSystemType());
        bind.setInterfaceVersion(config.getInterfaceVersion());
        bind.setAddressRange(config.getAddressRange());
        return bind;
    }
View Full Code Here

Examples of com.cloudhopper.smpp.pdu.BaseBind

        return session;
    }

    protected void doBind(DefaultSmppSession session, SmppSessionConfiguration config, SmppSessionHandler sessionHandler) throws SmppTimeoutException, SmppChannelException, SmppBindException, UnrecoverablePduException, InterruptedException {
        // create the bind request we'll use (may throw an exception)
        BaseBind bindRequest = createBindRequest(config);
        BaseBindResp bindResp = null;

        try {
            // attempt to bind to the SMSC
            // session implementation handles error checking, version negotiation, and can be discarded
View Full Code Here

Examples of com.cloudhopper.smpp.pdu.BaseBind

                channel.close();
                return true;
            }
        }

        BaseBind bind = (BaseBind)pdu;
        BaseBindResp bindResp = (BaseBindResp)bind.createResponse();

        if (!bind.getSystemId().equals(systemId)) {
            bindResp.setCommandStatus(SmppConstants.STATUS_INVSYSID);
        } else if (!bind.getPassword().equals(password)) {
            bindResp.setCommandStatus(SmppConstants.STATUS_INVPASWD);
        }

        session.addPduToWriteOnNextPduReceived(bindResp);
        return true;
View Full Code Here

Examples of com.cloudhopper.smpp.pdu.BaseBind

  // stop the writeTimeout timer
  this.writeTimeoutTimer.stop();
    }

    protected BaseBind createBindRequest(SmppSessionConfiguration config) throws UnrecoverablePduException {
        BaseBind bind = null;
        if (config.getType() == SmppBindType.TRANSCEIVER) {
            bind = new BindTransceiver();
        } else if (config.getType() == SmppBindType.RECEIVER) {
            bind = new BindReceiver();
        } else if (config.getType() == SmppBindType.TRANSMITTER) {
            bind = new BindTransmitter();
        } else {
            throw new UnrecoverablePduException("Unable to convert SmppSessionConfiguration into a BaseBind request");
        }
        bind.setSystemId(config.getSystemId());
        bind.setPassword(config.getPassword());
        bind.setSystemType(config.getSystemType());
        bind.setInterfaceVersion(config.getInterfaceVersion());
        bind.setAddressRange(config.getAddressRange());
        return bind;
    }
View Full Code Here

Examples of com.cloudhopper.smpp.pdu.BaseBind

        return session;
    }

    protected void doBind(DefaultSmppSession session, SmppSessionConfiguration config, SmppSessionHandler sessionHandler) throws SmppTimeoutException, SmppChannelException, SmppBindException, UnrecoverablePduException, InterruptedException {
        // create the bind request we'll use (may throw an exception)
        BaseBind bindRequest = createBindRequest(config);
        BaseBindResp bindResp = null;

        try {
            // attempt to bind to the SMSC
            // session implementation handles error checking, version negotiation, and can be discarded
View Full Code Here

Examples of com.cloudhopper.smpp.pdu.BaseBind

        // clean up all external resources
        this.clientBootstrap.releaseExternalResources();
    }

    protected BaseBind createBindRequest(SmppSessionConfiguration config) throws UnrecoverablePduException {
        BaseBind bind = null;
        if (config.getType() == SmppBindType.TRANSCEIVER) {
            bind = new BindTransceiver();
        } else if (config.getType() == SmppBindType.RECEIVER) {
            bind = new BindReceiver();
        } else if (config.getType() == SmppBindType.TRANSMITTER) {
            bind = new BindTransmitter();
        } else {
            throw new UnrecoverablePduException("Unable to convert SmppSessionConfiguration into a BaseBind request");
        }
        bind.setSystemId(config.getSystemId());
        bind.setPassword(config.getPassword());
        bind.setSystemType(config.getSystemType());
        bind.setInterfaceVersion(config.getInterfaceVersion());
        bind.setAddressRange(config.getAddressRange());
        return bind;
    }
View Full Code Here

Examples of com.cloudhopper.smpp.pdu.BaseBind

        return session;
    }

    protected void doBind(DefaultSmppSession session, SmppSessionConfiguration config, SmppSessionHandler sessionHandler) throws SmppTimeoutException, SmppChannelException, SmppBindException, UnrecoverablePduException, InterruptedException {
        // create the bind request we'll use (may throw an exception)
        BaseBind bindRequest = createBindRequest(config);
        BaseBindResp bindResp = null;

        try {
            // attempt to bind to the SMSC
            // session implementation handles error checking, version negotiation, and can be discarded
View Full Code Here

Examples of com.cloudhopper.smpp.pdu.BaseBind

            // we will not use the proper method of binding since we need to
            // access the bind response to verify it's correct
            DefaultSmppSession session0 = client0.doOpen(sessionConfig0, new DefaultSmppSessionHandler());

            // create a bind request based on this config
            BaseBind bindRequest = client0.createBindRequest(sessionConfig0);

            // execute a bind request and wait for a bind response
            BaseBindResp bindResponse = session0.bind(bindRequest, 200);

            Thread.sleep(100);
View Full Code Here

Examples of com.cloudhopper.smpp.pdu.BaseBind

            // we will not use the proper method of binding since we need to
            // access the bind response to verify it's correct
            DefaultSmppSession session0 = client0.doOpen(sessionConfig0, new DefaultSmppSessionHandler());

            // create a bind request based on this config
            BaseBind bindRequest = client0.createBindRequest(sessionConfig0);

            // execute a bind request and wait for a bind response
            BaseBindResp bindResponse = session0.bind(bindRequest, 200);

            Thread.sleep(100);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.