Package org.rhq.enterprise.communications.command.impl.stream

Examples of org.rhq.enterprise.communications.command.impl.stream.RemoteOutputStreamCommand


            StringBuilder fullMethod = new StringBuilder(getInterfaceSimpleName(remoteCmd.getTargetInterfaceName()));
            fullMethod.append('.');
            fullMethod.append(remoteCmd.getNameBasedInvocation().getMethodName());
            commandString = fullMethod.toString();
        } else if (command.getCommandType().equals(RemoteOutputStreamCommand.COMMAND_TYPE)) {
            RemoteOutputStreamCommand streamCmd = (RemoteOutputStreamCommand) command;
            StringBuilder fullMethod = new StringBuilder("OutputStream.");
            fullMethod.append(streamCmd.getNameBasedInvocation().getMethodName());
            fullMethod.append('.');
            fullMethod.append(streamCmd.getStreamId());
            commandString = fullMethod.toString();
        } else if (command.getCommandType().equals(RemoteInputStreamCommand.COMMAND_TYPE)) {
            RemoteInputStreamCommand streamCmd = (RemoteInputStreamCommand) command;
            StringBuilder fullMethod = new StringBuilder("InputStream.");
            fullMethod.append(streamCmd.getNameBasedInvocation().getMethodName());
            fullMethod.append('.');
            fullMethod.append(streamCmd.getStreamId());
            commandString = fullMethod.toString();
        } else {
            commandString = command.getCommandType().getName();
        }
        return commandString;
View Full Code Here


     * OutputStream</code>.
     *
     * @see CommandExecutor#execute(Command, InputStream, OutputStream)
     */
    public CommandResponse execute(Command command, InputStream in, OutputStream out) {
        RemoteOutputStreamCommand remote_command = new RemoteOutputStreamCommand(command);
        NameBasedInvocation invocation = remote_command.getNameBasedInvocation();
        String method_name = invocation.getMethodName();
        Object[] params = invocation.getParameters();
        String[] signature = invocation.getSignature();
        Class<?>[] class_signature = new Class[signature.length];

        RemoteOutputStreamCommandResponse response;

        try {
            // get the stream that the command wants to access
            Long stream_id = remote_command.getStreamId();
            OutputStream the_stream;

            synchronized (m_lock) {
                the_stream = m_remotedOutputStreams.get(stream_id);

View Full Code Here

            throw new RemoteIOException(LOG.getMsgString(CommI18NResourceKeys.REMOTE_OUTPUT_STREAM_HAS_NO_SENDER,
                m_streamId, m_serverEndpoint));
        }

        RemoteOutputStreamCommandResponse response;
        RemoteOutputStreamCommand cmd = new RemoteOutputStreamCommand();

        cmd.setNameBasedInvocation(new NameBasedInvocation(method, args));
        cmd.setStreamId(m_streamId);

        try {
            response = new RemoteOutputStreamCommandResponse(m_sender.sendSynch(cmd));
        } catch (Exception e) {
            throw new RemoteIOException(e);
View Full Code Here

TOP

Related Classes of org.rhq.enterprise.communications.command.impl.stream.RemoteOutputStreamCommand

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.