[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [hyades-dev] Execution of Internal APIs vs External APIs
|
Luc,
This is not necessary. These internal classes were not intended to be used
the way you are indicating. There are use-cases documented on the website
that shows the correct series of calls that should occur. You can link to
these off of the following page:
http://dev.eclipse.org/viewcvs/indextools.cgi/~checkout~/hyades-home/docs/components/execution_environment/execution_environment.html
Now, when you want to use the classes in the
org.eclipse.hyades.execution.core plugin outside of the eclipse environment
(ie. headless) you need to configure your factories correctly so that the
proper realizations get loaded. I would have to defer to Joseph Toomey for
the specifics of how to achieve this.
Richard K. Duggan
Problem Determination Enablement
IBM Toronto Laboratory
External: 905-413-2396
Internal: 969-2396
"Plaetinck, Luc"
<Luc.Plaetinck@co
mpuware.com> To
Sent by: "'hyades-dev@xxxxxxxxxxx'"
hyades-dev-admin@ <hyades-dev@xxxxxxxxxxx>
eclipse.org cc
Subject
11/11/2004 03:01 [hyades-dev] Execution of Internal
PM APIs vs External APIs
Please respond to
hyades-dev
When creating a standalone client for an Hyades agent (outside the Eclipse
framework), I need to be able to perform following tasks:
1. connect to the node (RAC) where the agent needs to run
2. start a process (which may be the agent or cause the agent to be
launched)
3. attach to the agent
4. send a message to the agent
5. receive info from the agent
Translated into Hyades components, this becomes:
1. create the node (node = NodeFactory.CreateNode(hostname) ) and connect
to the node ( connection = node.connect(port) )
2. create process and add listeners ( process =
ProcessFactory.createProcess(...), process.addProcessListener(...),
process.launch() )
3. create agent and add listener ( agent = AgentFactory.createAgent(...),
agent.addAgentListener(...), agent.attach() )
4. send a CustomCommand
5. through agent.startMonitoring(DataProcessor) or
AgentListener.handleCommand(CustomCommand)
So following APIs are minimally needed to make this work - plus some other
ones if you really are picky about what type of exception is thrown ;-)
import org.eclipse.hyades.internal.execution.local.common.CommandElement;
import org.eclipse.hyades.internal.execution.local.common.CustomCommand;
import org.eclipse.hyades.internal.execution.local.common.DataProcessor;
import org.eclipse.hyades.internal.execution.local.control.Agent;
import org.eclipse.hyades.internal.execution.local.control.AgentFactory;
import org.eclipse.hyades.internal.execution.local.control.AgentListener;
import org.eclipse.hyades.internal.execution.local.control.Connection;
import org.eclipse.hyades.internal.execution.local.control.Node;
import org.eclipse.hyades.internal.execution.local.control.NodeFactory;
import org.eclipse.hyades.internal.execution.local.control.Process;
import org.eclipse.hyades.internal.execution.local.control.ProcessFactory;
import org.eclipse.hyades.internal.execution.local.control.ProcessListener;
import
org.eclipse.hyades.internal.execution.local.control.InactiveAgentException;
import
org.eclipse.hyades.internal.execution.local.control.NoSuchApplicationException;
import
org.eclipse.hyades.internal.execution.local.control.ProcessActiveException;
Note that all these are defined as hyades.internal..
Similarly, for a Java agent, following imports are needed:
import org.eclipse.hyades.execution.invocation.RemoteInvocationException;
import org.eclipse.hyades.internal.execution.local.common.CustomCommand;
import
org.eclipse.hyades.internal.execution.remote.AgentControllerListener;
import org.eclipse.hyades.internal.execution.remote.CustomCommandHandler;
import org.eclipse.hyades.internal.execution.remote.MonitorListener;
import org.eclipse.hyades.internal.execution.remote.RemoteClientListener;
import
org.eclipse.hyades.internal.execution.remote.RemoteComponentSkeleton;
Note again the need for hyades.internal... packages
Attached are the sample client, agent and pluginconfig.xml for the agent.
<<SampleClient.java>> <<SampleAgent.java>> <<pluginconfig.xml>>
Luc
The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or
disclose it to anyone else. If you received it in error please notify us
immediately and then destroy it. (See attached file: SampleClient.java)(See
attached file: SampleAgent.java)(See attached file: pluginconfig.xml)
Attachment:
SampleClient.java
Description: Binary data
Attachment:
SampleAgent.java
Description: Binary data
Attachment:
pluginconfig.xml
Description: Binary data