Package hamsam.protocol.aim.command

Examples of hamsam.protocol.aim.command.Command


     */
    public void run() {

        while (!quit) {

            Command cmd = null;

            synchronized (buffer) {

                while (buffer.isEmpty()) {

                    try {
                        buffer.wait();
                    } catch (InterruptedException e) {
                        log.severe("writerThread interrupted!");
                        break;
                    }
                }

                if (buffer.isEmpty()) {
                    break;
                }

                cmd = (Command)buffer.remove(0);
            }

            try {

                if (cmd != null) {

                    byte[] cmdBytes = cmd.getBytes();
                    StringWriter sw = new StringWriter();
                    ByteUtils.dump(cmdBytes, sw);
                    //log.fine(sw.toString());
                    log.severe(sw.toString());
                    conn.write(cmdBytes);
View Full Code Here


    public void run() {

        while (!quit) {

 
            Command cmd = null;
            try {
                cmd = Command.getCommand(conn);
            } catch(SocketException e ) {
                //log.severe("SocketException caught!, breaking out of reader thread", e);
                break;     
View Full Code Here

TOP

Related Classes of hamsam.protocol.aim.command.Command

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.