createComponent (componentName) creates a dummy component wrapper using 'componentName'. Eventually, 'componentName' will be the name of the XML file that describes the component, once this has been decided on. Currently, the 'componentName' is an EnvObj, which is just a set of name value pairs describing the component. A live instance of this component can be created using the createInstance() function.
setMachineName (componentWrapper, machineName) specifies the machine on which we would like to instantiate the component from the component wrapper "componentWrapper".
setCreationMechanism (componentWrapper, creationMechanism) specifies the creation mechanism to be used while creating the component instance from the wrapper "componentWrapper". We currently support gram (using Cog), ssh and exec as our creation mechanisms.
createInstance takes in a handle to the component wrapper that we want to create and then creates a "live" instance of this component on the desired machine, using the desired creation mechanism. This means that the component is actually launched on the target by this method. If the desired instance can not be created, an XCATException is thrown.
connectPorts accepts the handles to the component wrappers whose uses and provides ports have to be connected, the names under which these uses and provides ports have been registered, and connects them together, if possible. If this connection can not be completed for some reason, then an XCATException is thrown.
invokeMethodOnComponent accepts a handle to the component wrapper on which the method has to be invoked. 'usesPortClassName' is the fully qualified name of the uses port which is needed to invoke the method. 'usesPortType' is a string describing the type of the uses port. This has to be same as the type of the provides port, which will be connected to. 'providesPortName' is the name by which the provides port of the component is registered. The 'methodName' is the name of the method to be invoked and 'methodParams' is an array of Java Objects, holding the parameters to the method. The XCAT composition tool adds a uses port dynamically, connects to the component's provides port, and invokes the desired method. If, at any step, there is a failure, an XCATException is thrown.