org.duracloud.ec2typicacomputeprovider.mgmt
Class EC2ComputeProvider

java.lang.Object
  extended by org.duracloud.ec2typicacomputeprovider.mgmt.EC2ComputeProvider
All Implemented Interfaces:
ComputeProvider

public class EC2ComputeProvider
extends java.lang.Object
implements ComputeProvider


Field Summary
protected  org.slf4j.Logger log
           
 
Constructor Summary
EC2ComputeProvider()
           
 
Method Summary
 InstanceDescription describeRunningInstance(Credential credential, java.lang.String instanceId, java.lang.String xmlProps)
          This method retrieves description of initiated instance.
 com.xerox.amazonws.ec2.Jec2 getEC2()
           
 EC2ComputeProviderProperties getProps()
           
 java.net.URL getWebappURL(Credential credential, java.lang.String instanceId, java.lang.String xmlProps)
          This method returns the URL of the instancewebapp on the instance with the provided id.
 boolean isInstanceBooting(Credential credential, java.lang.String instanceId, java.lang.String xmlProps)
          This method returns true if the webapp of provided instance is currently booting.
 boolean isInstanceRunning(Credential credential, java.lang.String instanceId, java.lang.String xmlProps)
          This method returns true if the instance is successfully running.
 boolean isWebappRunning(Credential credential, java.lang.String instanceId, java.lang.String xmlProps)
          This method returns true if the webapp of provided instance is successfully running.
 void setEC2(com.xerox.amazonws.ec2.Jec2 ec2)
           
 java.lang.String start(Credential credential, java.lang.String xmlProps)
          This method starts an instance-image with provided credential and Compute-provider properties.
 void stop(Credential credential, java.lang.String instanceId, java.lang.String xmlProps)
          This method stops the running instance with provided id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected final org.slf4j.Logger log
Constructor Detail

EC2ComputeProvider

public EC2ComputeProvider()
Method Detail

start

public java.lang.String start(Credential credential,
                              java.lang.String xmlProps)
                       throws java.lang.Exception
This method starts an instance-image with provided credential and Compute-provider properties.

Specified by:
start in interface ComputeProvider
Returns:
ID of running instance.
Throws:
java.lang.Exception

stop

public void stop(Credential credential,
                 java.lang.String instanceId,
                 java.lang.String xmlProps)
          throws java.lang.Exception
This method stops the running instance with provided id.

Specified by:
stop in interface ComputeProvider
Parameters:
credential - Compute-provider credentials
Throws:
java.lang.Exception

describeRunningInstance

public InstanceDescription describeRunningInstance(Credential credential,
                                                   java.lang.String instanceId,
                                                   java.lang.String xmlProps)
This method retrieves description of initiated instance.

Specified by:
describeRunningInstance in interface ComputeProvider
Parameters:
credential - Compute-provider credentials
Returns:
Throws:
java.lang.Exception

isInstanceRunning

public boolean isInstanceRunning(Credential credential,
                                 java.lang.String instanceId,
                                 java.lang.String xmlProps)
                          throws java.lang.Exception
This method returns true if the instance is successfully running.

Specified by:
isInstanceRunning in interface ComputeProvider
Parameters:
credential - Compute-provider credentials
Returns:
Throws:
java.lang.Exception

isWebappRunning

public boolean isWebappRunning(Credential credential,
                               java.lang.String instanceId,
                               java.lang.String xmlProps)
                        throws java.lang.Exception
This method returns true if the webapp of provided instance is successfully running.

Specified by:
isWebappRunning in interface ComputeProvider
Parameters:
credential - Compute-provider credentials
Returns:
Throws:
java.lang.Exception

isInstanceBooting

public boolean isInstanceBooting(Credential credential,
                                 java.lang.String instanceId,
                                 java.lang.String xmlProps)
                          throws java.lang.Exception
This method returns true if the webapp of provided instance is currently booting.

Specified by:
isInstanceBooting in interface ComputeProvider
Parameters:
credential - Compute-provider credentials
Returns:
Throws:
java.lang.Exception

getWebappURL

public java.net.URL getWebappURL(Credential credential,
                                 java.lang.String instanceId,
                                 java.lang.String xmlProps)
                          throws java.lang.Exception
This method returns the URL of the instancewebapp on the instance with the provided id.

Specified by:
getWebappURL in interface ComputeProvider
Parameters:
credential - Compute-provider credentials
Returns:
Throws:
java.lang.Exception

getProps

public EC2ComputeProviderProperties getProps()
                                      throws java.lang.Exception
Throws:
java.lang.Exception

getEC2

public com.xerox.amazonws.ec2.Jec2 getEC2()
                                   throws java.lang.Exception
Throws:
java.lang.Exception

setEC2

public void setEC2(com.xerox.amazonws.ec2.Jec2 ec2)


Copyright © 2009-2011 DuraSpace. All Rights Reserved.