org.rhq.enterprise.server.core.comm
Class ServerCommunicationsServiceUtil

java.lang.Object
  extended by org.rhq.enterprise.server.core.comm.ServerCommunicationsServiceUtil

public class ServerCommunicationsServiceUtil
extends Object

Provides static utilities to obtain and work with the server bootstrap service. This service provides access to the server-side comm services used to communicate with agents.

Author:
John Mazzitelli

Method Summary
static ServerCommunicationsServiceMBean getService()
          This will obtain a proxy to the server bootstrap service - this is the service that provides the communications services used to talk to agents.
static RemoteInputStream remoteInputStream(InputStream in)
          Given an input stream, this method prepares it to be remoted.
static RemoteOutputStream remoteInputStream(OutputStream out)
          Given an output stream, this method prepares it to be remoted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getService

public static ServerCommunicationsServiceMBean getService()
This will obtain a proxy to the server bootstrap service - this is the service that provides the communications services used to talk to agents.

Returns:
bootstrap proxy
Throws:
org.rhq.core.util.exception.WrappedRemotingException - if the bootstrap service is not available

remoteInputStream

public static RemoteInputStream remoteInputStream(InputStream in)
                                           throws Exception
Given an input stream, this method prepares it to be remoted. It installs the proper server-side components in order to allow this input stream to be accessible via a remote client (such as an agent).

Parameters:
in - the stream to remote
Returns:
the input stream wrapped in the object that provides the remoting capabilities
Throws:
Exception - if ununable to make the given input stream remotely accessible for some reason

remoteInputStream

public static RemoteOutputStream remoteInputStream(OutputStream out)
                                            throws Exception
Given an output stream, this method prepares it to be remoted. It installs the proper server-side components in order to allow this output stream to be accessible via a remote client (such as an agent).

Parameters:
in - the stream to remote
Returns:
the output stream wrapped in the object that provides the remoting capabilities
Throws:
Exception - if ununable to make the given output stream remotely accessible for some reason


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.