Package ie.omk.smpp.version

Examples of ie.omk.smpp.version.VersionException


     *             after binding to the SMSC.
     * @see ie.omk.smpp.version.SMPPVersion
     */
    public void setVersion(SMPPVersion version) throws VersionException {
        if (getState() != UNBOUND) {
            throw new VersionException("Cannot set SMPP version after binding");
        }

        if (version == null) {
            this.interfaceVersion = SMPPVersion.getDefaultVersion();
        } else {
View Full Code Here


            case RECEIVER:
                bindReq = (Bind) newInstance(SMPPPacket.BIND_RECEIVER);
                break;
            case TRANSCEIVER:
                if (this.interfaceVersion.isOlder(SMPPVersion.V34)) {
                    throw new VersionException(
                            "Cannot bind as transceiver in "
                            + interfaceVersion.toString());
                }
                bindReq = (Bind) newInstance(SMPPPacket.BIND_TRANSCEIVER);
                break;
View Full Code Here

        if (!interfaceVersion.isSupported(id)) {
            StringBuffer err = new StringBuffer(120)
            .append(interfaceVersion.toString())
            .append(" does not support command ID 0x")
            .append(Integer.toHexString(id));
            throw new VersionException(err.toString());
        }
        switch (id) {
        case SMPPPacket.BIND_TRANSMITTER:
        case SMPPPacket.BIND_RECEIVER:
        case SMPPPacket.BIND_TRANSCEIVER:
View Full Code Here

     */
    public SMPPPacket newInstance(int commandId) throws BadCommandIDException,
            VersionException {

        if (!this.interfaceVersion.isSupported(commandId)) {
            throw new VersionException(
                    "Command is not supported in this SMPP version");
        }

        SMPPPacket response = PacketFactory.newInstance(commandId);
        response.setVersion(this.interfaceVersion);
View Full Code Here

     *             after binding to the SMSC.
     * @see ie.omk.smpp.version.SMPPVersion
     */
    public void setVersion(SMPPVersion version) throws VersionException {
        if (getState() != UNBOUND) {
            throw new VersionException("Cannot set SMPP version after binding");
        }

        if (version == null) {
            this.interfaceVersion = SMPPVersion.getDefaultVersion();
        } else {
View Full Code Here

            case RECEIVER:
                bindReq = (Bind) newInstance(SMPPPacket.BIND_RECEIVER);
                break;
            case TRANSCEIVER:
                if (this.interfaceVersion.isOlder(SMPPVersion.V34)) {
                    throw new VersionException(
                            "Cannot bind as transceiver in "
                            + interfaceVersion.toString());
                }
                bindReq = (Bind) newInstance(SMPPPacket.BIND_TRANSCEIVER);
                break;
View Full Code Here

        if (!interfaceVersion.isSupported(id)) {
            StringBuffer err = new StringBuffer(120)
            .append(interfaceVersion.toString())
            .append(" does not support command ID 0x")
            .append(Integer.toHexString(id));
            throw new VersionException(err.toString());
        }
        switch (id) {
        case SMPPPacket.BIND_TRANSMITTER:
        case SMPPPacket.BIND_RECEIVER:
        case SMPPPacket.BIND_TRANSCEIVER:
View Full Code Here

     */
    public SMPPPacket newInstance(int commandId) throws BadCommandIDException,
            VersionException {

        if (!this.interfaceVersion.isSupported(commandId)) {
            throw new VersionException(
                    "Command is not supported in this SMPP version");
        }

        SMPPPacket response = PacketFactory.newInstance(commandId);
        response.setVersion(this.interfaceVersion);
View Full Code Here

TOP

Related Classes of ie.omk.smpp.version.VersionException

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.