Package net.schmizz.sshj.connection

Examples of net.schmizz.sshj.connection.ConnectionException


            throws SSHException {
        if (closed)
            if (error != null)
                throw error;
            else
                throw new ConnectionException("Stream closed");
    }
View Full Code Here


        SSHPacket reply = req(PF_REQ, forward);
        if (forward.port == 0)
            try {
                forward.port = reply.readUInt32AsInt();
            } catch (Buffer.BufferException e) {
                throw new ConnectionException(e);
            }
        log.info("Remote end listening on {}", forward);
        listeners.put(forward, listener);
        return forward;
    }
View Full Code Here

        try {
            chan = new ForwardedTCPIPChannel(conn, buf.readUInt32AsInt(), buf.readUInt32AsInt(), buf.readUInt32AsInt(),
                                             new Forward(buf.readString(), buf.readUInt32AsInt()),
                                             buf.readString(), buf.readUInt32AsInt());
        } catch (Buffer.BufferException be) {
            throw new ConnectionException(be);
        }
        if (listeners.containsKey(chan.getParentForward()))
            callListener(listeners.get(chan.getParentForward()), chan);
        else
            chan.reject(OpenFailException.Reason.ADMINISTRATIVELY_PROHIBITED, "Forwarding was not requested on `"
View Full Code Here

    }

    public void receive(byte[] data, int offset, int len)
            throws ConnectionException, TransportException {
        if (eof)
            throw new ConnectionException("Getting data on EOF'ed stream");
        synchronized (buf) {
            buf.putRawBytes(data, offset, len);
            buf.notifyAll();
        }
        win.consume(len);
View Full Code Here

            callListener(listener, new X11Channel(conn,
                                                  buf.readUInt32AsInt(),
                                                  buf.readUInt32AsInt(), buf.readUInt32AsInt(),
                                                  buf.readString(), buf.readUInt32AsInt()));
        } catch (Buffer.BufferException be) {
            throw new ConnectionException(be);
        }
    }
View Full Code Here

            throws ConnectionException {
        synchronized (lock) {
            log.debug("Consuming by " + dec + " down to " + size);
            size -= dec;
            if (size < 0)
                throw new ConnectionException("Window consumed to below 0");
        }
    }
View Full Code Here

    private void gotOpenConfirmation(SSHPacket buf)
            throws ConnectionException {
        try {
            init(buf.readUInt32AsInt(), buf.readUInt32AsInt(), buf.readUInt32AsInt());
        } catch (Buffer.BufferException be) {
            throw new ConnectionException(be);
        }
        open.set();
    }
View Full Code Here

    private void gotOpenFailure(SSHPacket buf)
            throws ConnectionException {
        try {
            open.deliverError(new OpenFailException(getType(), buf.readUInt32AsInt(), buf.readString()));
        } catch (Buffer.BufferException be) {
            throw new ConnectionException(be);
        }
        finishOff();
    }
View Full Code Here

                while (size < howMuch) {
                    log.debug("Waiting, need window space for {} bytes", howMuch);
                    try {
                        lock.wait();
                    } catch (InterruptedException ie) {
                        throw new ConnectionException(ie);
                    }
                }
                consume(howMuch);
            }
        }
View Full Code Here

                exitErrMsg = buf.readString();
                sendClose();
            } else
                super.handleRequest(req, buf);
        } catch (Buffer.BufferException be) {
            throw new ConnectionException(be);
        }
    }
View Full Code Here

TOP

Related Classes of net.schmizz.sshj.connection.ConnectionException

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.