Examples of ChannelOutputStream


Examples of org.apache.sshd.common.channel.ChannelOutputStream

            f.setException(new OpenChannelException(SshConstants.SSH_OPEN_ADMINISTRATIVELY_PROHIBITED, "connect denied"));
            return f;
        }

        connector = new NioSocketConnector();
        out = new ChannelOutputStream(this, remoteWindow, log, SshConstants.Message.SSH_MSG_CHANNEL_DATA);
        IoHandler handler = new IoHandlerAdapter() {
            @Override
            public void messageReceived(IoSession session, Object message) throws Exception {
                IoBuffer ioBuffer = (IoBuffer) message;
                int r = ioBuffer.remaining();
View Full Code Here

Examples of org.apache.sshd.common.channel.ChannelOutputStream

        // If the shell wants to be aware of the file system, let's do that too
        if (command instanceof FileSystemAware) {
            FileSystemFactory factory = ((ServerSession) session).getServerFactoryManager().getFileSystemFactory();
            ((FileSystemAware) command).setFileSystemView(factory.createFileSystemView(session));
        }
        out = new ChannelOutputStream(this, remoteWindow, log, SshConstants.Message.SSH_MSG_CHANNEL_DATA);
        err = new ChannelOutputStream(this, remoteWindow, log, SshConstants.Message.SSH_MSG_CHANNEL_EXTENDED_DATA);
        in = new ChannelPipedInputStream(localWindow);
        shellIn = new ChannelPipedOutputStream((ChannelPipedInputStream) in);
        if (log != null && log.isTraceEnabled()) {
            // Wrap in logging filters
            out = new LoggingFilterOutputStream(out, "OUT:", log);
View Full Code Here

Examples of org.apache.sshd.common.channel.ChannelOutputStream

            return openFuture;
        }

        @Override
        protected synchronized void doOpen() throws Exception {
            out = new ChannelOutputStream(this, remoteWindow, log, SshConstants.Message.SSH_MSG_CHANNEL_DATA);
        }
View Full Code Here

Examples of org.apache.sshd.common.channel.ChannelOutputStream

            f.setException(new OpenChannelException(SshConstants.SSH_OPEN_ADMINISTRATIVELY_PROHIBITED, "connect denied"));
            return f;
        }

        connector = new NioSocketConnector();
        out = new ChannelOutputStream(this, remoteWindow, log, SshConstants.Message.SSH_MSG_CHANNEL_DATA);
        IoHandler handler = new IoHandlerAdapter() {
            @Override
            public void messageReceived(IoSession session, Object message) throws Exception {
                IoBuffer ioBuffer = (IoBuffer) message;
                int r = ioBuffer.remaining();
View Full Code Here

Examples of org.apache.sshd.common.channel.ChannelOutputStream

        String originatorIpAddress = buffer.getString();
        int originatorPort = buffer.getInt();
        log.info("Receiving request for direct tcpip: hostToConnect={}, portToConnect={}, originatorIpAddress={}, originatorPort={}",
                new Object[] { hostToConnect, portToConnect, originatorIpAddress, originatorPort });
        connector = new NioSocketConnector();
        out = new ChannelOutputStream(this, remoteWindow, log, SshConstants.Message.SSH_MSG_CHANNEL_DATA);
        IoHandler handler = new IoHandlerAdapter() {
            @Override
            public void messageReceived(IoSession session, Object message) throws Exception {
                IoBuffer ioBuffer = (IoBuffer) message;
                int r = ioBuffer.remaining();
View Full Code Here

Examples of org.apache.sshd.common.channel.ChannelOutputStream

        addEnvVariable(Environment.ENV_USER, ((ServerSession) session).getUsername());
        // If the shell wants to be aware of the session, let's do that
        if (command instanceof SessionAware) {
            ((SessionAware) command).setSession((ServerSession) session);
        }
        out = new ChannelOutputStream(this, remoteWindow, log, SshConstants.Message.SSH_MSG_CHANNEL_DATA);
        err = new ChannelOutputStream(this, remoteWindow, log, SshConstants.Message.SSH_MSG_CHANNEL_EXTENDED_DATA);
        // Wrap in logging filters
        out = new LoggingFilterOutputStream(out, "OUT:", log);
        err = new LoggingFilterOutputStream(err, "ERR:", log);
        in = new ChannelPipedInputStream(localWindow);
        shellIn = new ChannelPipedOutputStream((ChannelPipedInputStream) in);
View Full Code Here

Examples of org.apache.sshd.common.channel.ChannelOutputStream

            return openFuture;
        }

        @Override
        protected synchronized void doOpen() throws Exception {
            out = new ChannelOutputStream(this, remoteWindow, log, SshConstants.Message.SSH_MSG_CHANNEL_DATA);
        }
View Full Code Here

Examples of org.apache.sshd.common.channel.ChannelOutputStream

        String originatorIpAddress = buffer.getString();
        int originatorPort = buffer.getInt();
        log.info("Receiving request for direct tcpip: hostToConnect={}, portToConnect={}, originatorIpAddress={}, originatorPort={}",
                new Object[] { hostToConnect, portToConnect, originatorIpAddress, originatorPort });
        connector = new NioSocketConnector();
        out = new ChannelOutputStream(this, remoteWindow, log, SshConstants.Message.SSH_MSG_CHANNEL_DATA);
        IoHandler handler = new IoHandlerAdapter() {
            @Override
            public void messageReceived(IoSession session, Object message) throws Exception {
                IoBuffer ioBuffer = (IoBuffer) message;
                int r = ioBuffer.remaining();
View Full Code Here

Examples of org.apache.sshd.common.channel.ChannelOutputStream

            return openFuture;
        }

        @Override
        protected synchronized void doOpen() throws Exception {
            out = new ChannelOutputStream(this, remoteWindow, log, SshConstants.Message.SSH_MSG_CHANNEL_DATA);
        }
View Full Code Here

Examples of org.jnode.util.ChannelOutputStream

                (DeviceUtils.getAPI("serial0", SerialPortAPI.class));
            final ByteChannel channel = api.getChannel(null);

            System.out.println("Writing a test string to the serial port.");
            PrintWriter w = new PrintWriter(new OutputStreamWriter(
                new ChannelOutputStream(channel, 1000)));
            w.print("Hello World!\r\n");
            w.print("This is a second line of text!\r\n");
            w.print("Just for fun, a third line!\r\n");
            w.flush();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.