com.abiquo.api.resources.CommandResource Class Reference

This class represents a CommandResource, and allows to remotely execute shell commands. More...

Inherits ResourceInstance.

List of all members.

Public Member Functions

 CommandResource ()
 Creates a new CommandResource with the default values.
 CommandResource (ResourceInstance resourceInstance)
 Creates a new CommandResource based on a generic ResourceInstance.
Job execute (String command, boolean captureStdout, boolean captureStderr, boolean captureStdin)
 Creates a new Job which once executed, executes the desired command.
Job execute (String command, DataType dataType, String outputFileName, boolean captureStdout, boolean captureStderr, boolean captureStdin)
 Creates a new Job which once executed, executes the desired command and captures the output.

Static Public Member Functions

static CommandResource cast (ResourceInstance resourceInstance)
 Converts a generic ResourceInstance into a new one of type CommandResource.

Static Public Attributes

static final String ID = "CommandResource"
 String containing the identifier for this resource.


Detailed Description

This class represents a CommandResource, and allows to remotely execute shell commands.

Note:
XML description of the resource:
 <?xml version="1.0" encoding="utf-8"?>
 <Resource xmlns="http://www.abiquo.com/schema/Domain.xsd" LocalId="CommandResource">
 	<FunctionalityList>
 		<Functionality LocalId="Execute" ReturnType="void">
 			<AttributeList>
 				<Attribute Name="command" Type="string" />
 				<Attribute Name="stdout"  Type="bool"   />
 				<Attribute Name="stderr"  Type="bool"   />
 				<Attribute Name="stdin"   Type="bool"   /> <!-- Embedded or referenced.-->
 			</AttributeList>
 		</Functionality>
 	</FunctionalityList>
 </Resource>
 

Constructor & Destructor Documentation

com.abiquo.api.resources.CommandResource.CommandResource ( ResourceInstance  resourceInstance  ) 

Creates a new CommandResource based on a generic ResourceInstance.

Parameters:
resourceInstance The generic ResourceInstance


Member Function Documentation

static CommandResource com.abiquo.api.resources.CommandResource.cast ( ResourceInstance  resourceInstance  )  [static]

Converts a generic ResourceInstance into a new one of type CommandResource.

Parameters:
resourceInstance The generic ResourceInstance
Returns:
The resultant CommandResource

Job com.abiquo.api.resources.CommandResource.execute ( String  command,
boolean  captureStdout,
boolean  captureStderr,
boolean  captureStdin 
)

Creates a new Job which once executed, executes the desired command.

Parameters:
command The command template to execute
captureStdout Redirect standard out True or false
captureStderr Redirect standard error True or false
captureStdin Redirect and input file by standard in
Returns:
The job containing information about the demand

Job com.abiquo.api.resources.CommandResource.execute ( String  command,
DataType  dataType,
String  outputFileName,
boolean  captureStdout,
boolean  captureStderr,
boolean  captureStdin 
)

Creates a new Job which once executed, executes the desired command and captures the output.

Parameters:
command The command template to execute
dataType the data type
outputFileName the output file name
captureStdout Redirect standard out True or false
captureStderr Redirect standard error True or false
captureStdin Redirect and input file by standard in
Returns:
The Job containing information about the demand


Member Data Documentation

final String com.abiquo.api.resources.CommandResource.ID = "CommandResource" [static]

String containing the identifier for this resource.

Note:
To avoid misspellings when provision a resource, you should use this constant ID instead of a manually typed string.


The documentation for this class was generated from the following file:

Generated on Mon Sep 15 20:13:10 2008 for FrameworkAPI by  doxygen 1.5.5