de.jw.cloud42.webservice
Class Cloud42RemotingService

java.lang.Object
  extended by de.jw.cloud42.webservice.Cloud42RemotingService

public class Cloud42RemotingService
extends java.lang.Object

Service class for Remoting Service, provides methods to execute arbitrary commands on an AMI instance.

Author:
fbitzer

Constructor Summary
Cloud42RemotingService()
           
 
Method Summary
 RemoteResult bundleImage(java.lang.String dnsName, java.lang.String rsaKey, AwsCredentials credentials, java.lang.String targetBucket, java.lang.String newImageName, boolean is64Bit, boolean notifyWhenFinished, java.lang.String topic, java.lang.String messageText, java.lang.String messageInfo, byte[] keyFile, byte[] certFile)
          Bundles a new image from a running AMI.
 RemoteResult executeBatch(java.lang.String dnsName, java.lang.String rsaKey, byte[] batchFile)
          Executes a batch file / shell script on the instance.
 RemoteResult executeCommand(java.lang.String dnsName, java.lang.String rsaKey, java.lang.String command)
          Executes the given command on the given remote host.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cloud42RemotingService

public Cloud42RemotingService()
Method Detail

executeCommand

public RemoteResult executeCommand(java.lang.String dnsName,
                                   java.lang.String rsaKey,
                                   java.lang.String command)
Executes the given command on the given remote host.

Parameters:
dnsName - Hostname or IP address of the target AMI instance.
rsaKey - RSA private key as String.
command - the command to execute.
Returns:
RemoteResult object containing the output of the command.

executeBatch

public RemoteResult executeBatch(java.lang.String dnsName,
                                 java.lang.String rsaKey,
                                 byte[] batchFile)
Executes a batch file / shell script on the instance.

Parameters:
dnsName - Hostname or IP address of the target AMI instance.
rsaKey - RSA private key as String.
batchFile - Shellscript to execute. Transferred as SOAP attachment using MTOM.
Returns:
RemoteResult object containing the output of the script.

bundleImage

public RemoteResult bundleImage(java.lang.String dnsName,
                                java.lang.String rsaKey,
                                AwsCredentials credentials,
                                java.lang.String targetBucket,
                                java.lang.String newImageName,
                                boolean is64Bit,
                                boolean notifyWhenFinished,
                                java.lang.String topic,
                                java.lang.String messageText,
                                java.lang.String messageInfo,
                                byte[] keyFile,
                                byte[] certFile)
Bundles a new image from a running AMI.

Parameters:
dnsName - Hostname of AMI to bundle.
rsaKey - RSA private key to connect to AMI instance.
credentials - AWS credentials.
targetBucket - Bucket on S3 where new AMI should be stored.
newImageName - Name of new image.
is64Bit - Set to true, if a 64 bit image should be created.
notifyWhenFinished - Trigger a notification message when bundling has finished.
topic - Topic for the notification.
messageText - Notification text.
messageInfo - Additional notification information.
keyFile - The user's private key file for authorization at the EC2 API.
certFile - The user's certificate file for authorization at the EC2 API.
Returns:
RemoteResult object indicating success or an exception.


Copyright © 2010 just works! Software. All Rights Reserved.