Package org.apache.sshd.common

Examples of org.apache.sshd.common.RuntimeSshException


            if (v instanceof RuntimeException) {
                throw (RuntimeException) v;
            } else if (v instanceof Error) {
                throw (Error) v;
            } else if (v instanceof Throwable) {
                throw (RuntimeSshException) new RuntimeSshException("Error reading from channel.").initCause((Throwable) v);
            } else if (v instanceof Integer) {
                return (Integer) v;
            } else {
                throw new IllegalStateException();
            }
View Full Code Here


            ExecutorService executor = ThreadUtils.newFixedThreadPool(
                    manager.toString() + "-nio2",
                    getNioWorkers());
            group = AsynchronousChannelGroup.withThreadPool(executor);
        } catch (IOException e) {
            throw new RuntimeSshException(e);
        }
    }
View Full Code Here

                            @Override
                            public OpenFuture open(int recipient, int rwsize, int rmpsize, Buffer buffer) {
                                try {
                                    channelLatch.await();
                                } catch (InterruptedException e) {
                                    throw new RuntimeSshException(e);
                                }
                                return super.open(recipient, rwsize, rmpsize, buffer);
                            }

                            @Override
View Full Code Here

        try {
            ExecutorService executor = Executors.newFixedThreadPool(getNioWorkers());
            ((ThreadPoolExecutor) executor).setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
            group = AsynchronousChannelGroup.withThreadPool(executor);
        } catch (IOException e) {
            throw new RuntimeSshException(e);
        }
    }
View Full Code Here

                            @Override
                            public OpenFuture open(int recipient, int rwsize, int rmpsize, Buffer buffer) {
                                try {
                                    channelLatch.await();
                                } catch (InterruptedException e) {
                                    throw new RuntimeSshException(e);
                                }
                                return super.open(recipient, rwsize, rmpsize, buffer);
                            }
                        };
                    }
View Full Code Here

            this.handler = handler;
            executor = Executors.newFixedThreadPool(getNioWorkers());
            group = AsynchronousChannelGroup.withThreadPool(executor);
            sessions = new ConcurrentHashMap<Long, IoSession>();
        } catch (IOException e) {
            throw new RuntimeSshException(e);
        }
    }
View Full Code Here

                            @Override
                            public OpenFuture open(int recipient, int rwsize, int rmpsize, Buffer buffer) {
                                try {
                                    channelLatch.await();
                                } catch (InterruptedException e) {
                                    throw new RuntimeSshException(e);
                                }
                                return super.open(recipient, rwsize, rmpsize, buffer);
                            }
                        };
                    }
View Full Code Here

        if (v instanceof RuntimeException) {
            throw (RuntimeException) v;
        } else if (v instanceof Error) {
            throw (Error) v;
        } else if (v instanceof Throwable) {
            throw (RuntimeSshException) new RuntimeSshException("Failed to get the session.").initCause((Throwable) v);
        } else if (v instanceof ClientSession) {
            return (ClientSession) v;
        } else {
            return null;
        }
View Full Code Here

TOP

Related Classes of org.apache.sshd.common.RuntimeSshException

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.