Search in sources :

Example 1 with CommandContinuation

use of org.exist.debuggee.CommandContinuation in project exist by eXist-db.

the class RequestDecoder method doDecode.

@Override
protected boolean doDecode(IoSession session, IoBuffer in, ProtocolDecoderOutput out) throws Exception {
    byte b;
    while (true) {
        if (in.remaining() > 0) {
            b = in.get();
            if (b == (byte) 0) {
                Command command = Command.parse(session, sCommand);
                command.exec();
                System.out.println("doDecode command = " + command);
                if (!(command instanceof CommandContinuation)) {
                    out.write(command);
                }
                sCommand = "";
                continue;
            }
            sCommand += (char) b;
        } else {
            return false;
        }
    }
}
Also used : Command(org.exist.debuggee.dbgp.packets.Command) CommandContinuation(org.exist.debuggee.CommandContinuation)

Aggregations

CommandContinuation (org.exist.debuggee.CommandContinuation)1 Command (org.exist.debuggee.dbgp.packets.Command)1