Package ie.omk.smpp.message

Examples of ie.omk.smpp.message.SMPPPacket


               }
            }
            next = (Object) packets.remove(0);
        }

        SMPPPacket pak = (SMPPPacket) next;
        if (pak instanceof SMPPResponse) {
            synchronized (this) {
                try {
                    if (requestSent < 1) {
                        this.wait((long) timeout);
                    }
               } catch (InterruptedException x) {
                    throw new IOException("No packets available.");
               }
            }

            // Simulate a timeout..
            if (requestSent < 1) {
                throw new SocketTimeoutException("Timed out waiting on packet");
            }
        }

        int l = pak.getLength();
        out.setBuf(buf, l);
        pak.writeTo(out);

        return out.getBuf();
    }
View Full Code Here


     *         representing SMPP command <code>id</code>.
     * @throws ie.omk.smpp.BadCommandIDException
     *             if the command ID is not recognized.
     */
    public static SMPPPacket newInstance(int id) throws BadCommandIDException {
        SMPPPacket response = null;

        switch (id) {
        case SMPPPacket.GENERIC_NACK:
            response = new GenericNack();
            break;
View Full Code Here

TOP

Related Classes of ie.omk.smpp.message.SMPPPacket

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.