Package org.rhq.enterprise.communications.command.client

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


        CommandResponse results = null;
        Long stream_id = null;

        try {
            stream_id = agent1.getServiceContainer().addRemoteInputStream(in);
            test_command.setParameterValue(SimpleTestStreamService.INPUT_STREAM_PARAM, new RemoteInputStream(stream_id,
                agent1.getServiceContainer()));

            results = agent1.getClientCommandSender().sendSynch(test_command);
        } catch (Throwable t) {
            throw new Exception(t);
View Full Code Here


        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

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

        String stream_data1 = "FIRST Stream this string to a POJO... 1111111111";
        InputStream in1 = new ByteArrayInputStream(stream_data1.getBytes());
        Long stream_id1 = agent1.getServiceContainer().addRemoteInputStream(in1);
        InputStream remote_stream1 = new RemoteInputStream(stream_id1, agent1.getServiceContainer());

        String stream_data2 = "TWO Stream this string to a POJO... 2222222222";
        InputStream in2 = new ByteArrayInputStream(stream_data2.getBytes());
        Long stream_id2 = agent1.getServiceContainer().addRemoteInputStream(in2);
        InputStream remote_stream2 = new RemoteInputStream(stream_id2, agent1.getServiceContainer());

        ITestStreamPojo pojo = agent1.getClientCommandSender().getClientRemotePojoFactory().getRemotePojo(
            ITestStreamPojo.class);

        String[] results;
View Full Code Here

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

        String stream_data = "Stream this string to a POJO over SSL...";
        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 a middle argument
        String results;
View Full Code Here

        GenericCommand test_command = new GenericCommand(SimpleTestStreamService.COMMAND_TYPE, null);
        CommandResponse results = null;
        Long stream_id = null;

        try {
            test_command.setParameterValue(SimpleTestStreamService.INPUT_STREAM_PARAM, new RemoteInputStream(in, agent1
                .getServiceContainer()));

            results = agent1.getClientCommandSender().sendSynch(test_command);
        } catch (Throwable t) {
            throw new Exception(ThrowableUtil.getAllMessages(t), t);
View Full Code Here

        CommandResponse results = null;
        Long stream_id = null;

        try {
            test_command.setParameterValue(SimpleTestStreamService.RETURN_COUNT_ONLY_PARAM, "");
            test_command.setParameterValue(SimpleTestStreamService.INPUT_STREAM_PARAM, new RemoteInputStream(in, agent1
                .getServiceContainer()));

            results = agent1.getClientCommandSender().sendSynch(test_command);
        } catch (Throwable t) {
            throw new Exception(ThrowableUtil.getAllMessages(t), t);
View Full Code Here

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

        InputStream in = new ByteArrayInputStream(LARGE_STRING_BYTES);
        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

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

        InputStream in = new ByteArrayInputStream(LARGE_STRING_BYTES);
        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

        Preferences preferencesNode = topNode.node("commstream2test");
        return preferencesNode;
    }

    private InputStream prepareRemoteStreamInServer1(InputStream in) throws Exception {
        return new RemoteInputStream(in, serviceContainer1);
    }
View Full Code Here

        return new RemoteOutputStream(out, serviceContainer1);
    }

    // package scoped so it can be used by the pojo class
    InputStream prepareRemoteStreamInServer2(InputStream in) throws Exception {
        return new RemoteInputStream(in, serviceContainer2);
    }
View Full Code Here

TOP

Related Classes of org.rhq.enterprise.communications.command.client.RemoteInputStream

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.