@SuppressWarnings("deprecation") @Override protected void main(Channel channel) throws IOException, InterruptedException { // capture the identity given by the transport, since this can be useful for SecurityRealm.createCliAuthenticator() channel.setProperty(CLICommand.TRANSPORT_AUTHENTICATION, Jenkins.getAuthentication()); channel.setProperty(CliEntryPoint.class.getName(), new CliManagerImpl(channel)); } };
protected void runCli(Connection c) throws IOException, InterruptedException { ChannelBuilder cb; String name = "CLI channel from " + socket.getInetAddress(); // Connection can contain cipher wrapper, which can't be NIO-ed. // if (hub!=null) // cb = hub.newChannelBuilder(name, Computer.threadPoolForRemoting); // else cb = new ChannelBuilder(name, Computer.threadPoolForRemoting); Channel channel = cb .withMode(Mode.BINARY) .withRestricted(true) .withBaseLoader(Jenkins.getActiveInstance().pluginManager.uberClassLoader) .build(new BufferedInputStream(c.in), new BufferedOutputStream(c.out)); channel.setProperty(CliEntryPoint.class.getName(),new CliManagerImpl(channel)); channel.join(); } }
@SuppressWarnings("deprecation") @Override protected void main(Channel channel) throws IOException, InterruptedException { // capture the identity given by the transport, since this can be useful for SecurityRealm.createCliAuthenticator() channel.setProperty(CLICommand.TRANSPORT_AUTHENTICATION, Jenkins.getAuthentication()); channel.setProperty(CliEntryPoint.class.getName(), new CliManagerImpl(channel)); } };
protected void main(Channel channel) throws IOException, InterruptedException { // capture the identity given by the transport, since this can be useful for SecurityRealm.createCliAuthenticator() channel.setProperty(CLICommand.TRANSPORT_AUTHENTICATION, getAuthentication()); channel.setProperty(CliEntryPoint.class.getName(), new CliManagerImpl()); } });
protected void main(Channel channel) throws IOException, InterruptedException { // capture the identity given by the transport, since this can be useful for SecurityRealm.createCliAuthenticator() channel.setProperty(CLICommand.TRANSPORT_AUTHENTICATION, getAuthentication()); channel.setProperty(CliEntryPoint.class.getName(), new CliManagerImpl()); } });
protected void main(Channel channel) throws IOException, InterruptedException { // capture the identity given by the transport, since this can be useful for SecurityRealm.createCliAuthenticator() channel.setProperty(CLICommand.TRANSPORT_AUTHENTICATION, getAuthentication()); channel.setProperty(CliEntryPoint.class.getName(), new CliManagerImpl()); } });
protected void main(Channel channel) throws IOException, InterruptedException { // capture the identity given by the transport, since this can be useful for SecurityRealm.createCliAuthenticator() channel.setProperty(CLICommand.TRANSPORT_AUTHENTICATION, getAuthentication()); channel.setProperty(CliEntryPoint.class.getName(), new CliManagerImpl()); } });
/** * Handles CLI connection request. */ private void runCliConnect(DataInputStream in, PrintWriter out) throws IOException, InterruptedException { out.println("Welcome"); Channel channel = new Channel("CLI channel from " + s.getInetAddress(), Computer.threadPoolForRemoting, Mode.BINARY, new BufferedInputStream(new SocketInputStream(this.s)), new BufferedOutputStream(new SocketOutputStream(this.s)), null, true); channel.setProperty(CliEntryPoint.class.getName(),new CliManagerImpl()); channel.join(); }
/** * Handles CLI connection request. */ private void runCliConnect(DataInputStream in, PrintWriter out) throws IOException, InterruptedException { out.println("Welcome"); Channel channel = new Channel("CLI channel from " + s.getInetAddress(), Computer.threadPoolForRemoting, Mode.BINARY, new BufferedInputStream(new SocketInputStream(this.s)), new BufferedOutputStream(new SocketOutputStream(this.s)), null, true); channel.setProperty(CliEntryPoint.class.getName(), new CliManagerImpl()); channel.join(); }
/** * Handles CLI connection request. */ private void runCliConnect(DataInputStream in, PrintWriter out) throws IOException, InterruptedException { out.println("Welcome"); Channel channel = new Channel("CLI channel from " + s.getInetAddress(), Computer.threadPoolForRemoting, Mode.BINARY, new BufferedInputStream(new SocketInputStream(this.s)), new BufferedOutputStream(new SocketOutputStream(this.s)), null, true); channel.setProperty(CliEntryPoint.class.getName(),new CliManagerImpl()); channel.join(); }
/** * Handles CLI connection request. */ private void runCliConnect(DataInputStream in, PrintWriter out) throws IOException, InterruptedException { out.println("Welcome"); Channel channel = new Channel("CLI channel from " + s.getInetAddress(), Computer.threadPoolForRemoting, Mode.BINARY, new BufferedInputStream(new SocketInputStream(this.s)), new BufferedOutputStream(new SocketOutputStream(this.s)), null, true); channel.setProperty(CliEntryPoint.class.getName(),new CliManagerImpl()); channel.join(); }
protected void runCli(Connection c) throws IOException, InterruptedException { ChannelBuilder cb; String name = "CLI channel from " + socket.getInetAddress(); // Connection can contain cipher wrapper, which can't be NIO-ed. // if (hub!=null) // cb = hub.newChannelBuilder(name, Computer.threadPoolForRemoting); // else cb = new ChannelBuilder(name, Computer.threadPoolForRemoting); Channel channel = cb .withMode(Mode.BINARY) .withRestricted(true) .withBaseLoader(Jenkins.getActiveInstance().pluginManager.uberClassLoader) .build(new BufferedInputStream(c.in), new BufferedOutputStream(c.out)); channel.setProperty(CliEntryPoint.class.getName(),new CliManagerImpl(channel)); channel.join(); } }