Examples of RemoteInputStream


Examples of hudson.remoting.RemoteInputStream

            pool.shutdown();
    }

    public int execute(List<String> args, InputStream stdin, OutputStream stdout, OutputStream stderr) {
        return entryPoint.main(args,Locale.getDefault(),
                new RemoteInputStream(stdin),
                new RemoteOutputStream(stdout),
                new RemoteOutputStream(stderr));
    }
View Full Code Here

Examples of hudson.remoting.RemoteInputStream

        /**
         * Executed on remote, returns connection wrapper with remote streams.
         */
        private Object writeReplace() {
            return new ConnectionImpl(new RemoteInputStream(input), new RemoteOutputStream(output));
        }
View Full Code Here

Examples of hudson.remoting.RemoteInputStream

     *      The stream will be closed by this method after it's fully read.
     * @since 1.283
     * @see #unzip(FilePath)
     */
    public void unzipFrom(InputStream _in) throws IOException, InterruptedException {
        final InputStream in = new RemoteInputStream(_in);
        act(new FileCallable<Void>() {
            public Void invoke(File dir, VirtualChannel channel) throws IOException {
                unzip(dir, in);
                return null;
            }
View Full Code Here

Examples of hudson.remoting.RemoteInputStream

     *      The compression method in use.
     * @since 1.292
     */
    public void untarFrom(InputStream _in, final TarCompression compression) throws IOException, InterruptedException {
        try {
            final InputStream in = new RemoteInputStream(_in);
            act(new FileCallable<Void>() {
                public Void invoke(File dir, VirtualChannel channel) throws IOException {
                    readFromTar("input stream",dir, compression.extract(in));
                    return null;
                }
View Full Code Here

Examples of org.rhq.enterprise.communications.command.client.RemoteInputStream

        return binaryFileTypes.contains(path.substring(index + 1, path.length()));
    }

    static InputStream remoteStream(InputStream stream) {
        RemoteInputStream remoteStream = (RemoteInputStream) stream;
        ServiceContainer serviceContainer = ServerCommunicationsServiceUtil.getService().getServiceContainer();
        ClientCommandSenderConfiguration config = serviceContainer.getClientConfiguration();
        ClientCommandSender sender = serviceContainer.createClientCommandSender(remoteStream.getServerEndpoint(),
            config);
        sender.startSending();
        remoteStream.setClientCommandSender(sender);

        return stream;
    }
View Full Code Here

Examples of org.rhq.enterprise.communications.command.client.RemoteInputStream

     *
     * @throws Exception if ununable to make the given input stream remotely accessible for some reason
     */
    public static RemoteInputStream remoteInputStream(InputStream in) throws Exception {
        ServiceContainer sc = getService().getServiceContainer();
        return new RemoteInputStream(in, sc);
    }
View Full Code Here

Examples of org.rhq.enterprise.communications.command.client.RemoteInputStream

                LookupUtil.getPluginDeploymentScanner().scan();
            }

            FileInputStream fis = new FileInputStream(file_to_stream);
            BufferedInputStream bis = new BufferedInputStream(fis, 1024 * 32);
            RemoteInputStream in = ServerCommunicationsServiceUtil.remoteInputStream(bis);

            return in;
        } catch (Exception e) {
            throw new WrappedRemotingException(e);
        }
View Full Code Here

Examples of org.rhq.enterprise.communications.command.client.RemoteInputStream

    /**
     * @see CommandExecutor#execute(Command, InputStream, OutputStream)
     */
    public CommandResponse execute(Command command, InputStream in, OutputStream out) {
        RemoteInputStream stream = (RemoteInputStream) command.getParameterValue(INPUT_STREAM_PARAM);

        prepareRemoteInputStream(stream);

        GenericCommandResponse response;

View Full Code Here

Examples of org.rhq.enterprise.communications.command.client.RemoteInputStream

            if (sc == null) {
                return stream;
            }

            return new RemoteInputStream(stream, sc);
        } catch (Exception e) {
            throw new RuntimeException(m_agent.getI18NMsg().getMsg(AgentI18NResourceKeys.FAILED_TO_REMOTE_STREAM), e);
        }
    }
View Full Code Here

Examples of org.rhq.enterprise.communications.command.client.RemoteInputStream

        assert agent2.isStarted() : "agent2 should have been started";

        String stream_data = "Stream this string to a POJO...";
        InputStream in = new ByteArrayInputStream(stream_data.getBytes());
        Long stream_id = agent1.getServiceContainer().addRemoteInputStream(in);
        InputStream remote_stream = new RemoteInputStream(stream_id, agent1.getServiceContainer());
        ITestStreamPojo pojo = agent1.getClientCommandSender().getClientRemotePojoFactory().getRemotePojo(
            ITestStreamPojo.class);

        // make a call where the stream is the only argument
        String results;
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.