org.rhq.enterprise.agent
Class AgentServiceRemoter

java.lang.Object
  extended by org.rhq.enterprise.agent.AgentServiceRemoter
All Implemented Interfaces:
AgentServiceLifecycleListener, AgentServiceStreamRemoter

public class AgentServiceRemoter
extends Object
implements AgentServiceLifecycleListener, AgentServiceStreamRemoter

This AgentServiceLifecycleListener will enable each agent service that is started for remote access. As agent services go down, this listener ensures that they are no longer remotely accessible.

Author:
John Mazzitelli

Constructor Summary
AgentServiceRemoter(AgentMain agent)
          Creates a new AgentServiceRemoter object.
 
Method Summary
 InputStream prepareInputStream(InputStream stream)
          This will remote the input stream using the agent's communications services.
 OutputStream prepareOutputStream(OutputStream stream)
          This will remote the output stream using the agent's communications services.
 void started(AgentService agent_service)
          This method will remote the given agent service so external clients can communicate with it.
 void stopped(AgentService agent_service)
          This method will ensure that the stopped agent service will no longer be accessible to external clients.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgentServiceRemoter

public AgentServiceRemoter(AgentMain agent)
Creates a new AgentServiceRemoter object.

Parameters:
agent - the agent that provides the remoting infrastructure
Method Detail

started

public void started(AgentService agent_service)
This method will remote the given agent service so external clients can communicate with it.

Specified by:
started in interface AgentServiceLifecycleListener
See Also:
AgentServiceLifecycleListener.started(AgentService)

stopped

public void stopped(AgentService agent_service)
This method will ensure that the stopped agent service will no longer be accessible to external clients.

Specified by:
stopped in interface AgentServiceLifecycleListener
See Also:
AgentServiceLifecycleListener.stopped(AgentService)

prepareInputStream

public InputStream prepareInputStream(InputStream stream)
This will remote the input stream using the agent's communications services.

Specified by:
prepareInputStream in interface AgentServiceStreamRemoter
See Also:
AgentServiceStreamRemoter.prepareInputStream(java.io.InputStream)

prepareOutputStream

public OutputStream prepareOutputStream(OutputStream stream)
This will remote the output stream using the agent's communications services.

Specified by:
prepareOutputStream in interface AgentServiceStreamRemoter
See Also:
AgentServiceStreamRemoter.prepareOutputStream(OutputStream)


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