com.atlassian.bamboo.agent.elastic.server
Class RemoteElasticAgentImpl

java.lang.Object
  extended by com.atlassian.bamboo.agent.elastic.server.AbstractRemoteElasticAgent
      extended by com.atlassian.bamboo.agent.elastic.server.RemoteElasticAgentImpl
All Implemented Interfaces:
RemoteElasticAgent

public class RemoteElasticAgentImpl
extends AbstractRemoteElasticAgent


Constructor Summary
RemoteElasticAgentImpl(ElasticAgentManager manager, ElasticAgentTunnelManager tunnelManager, ErrorHandler errorHandler, com.atlassian.aws.AWSAccount awsAccount, com.atlassian.aws.ec2.EC2Image ec2Image, java.net.URL baseURL, int startupTimeoutSeconds, RemoteElasticAgentListener listener, java.util.concurrent.Executor executor, java.security.KeyStore keyStore, ElasticConfiguration elasticConfiguration, com.atlassian.bamboo.agent.elastic.server.EBSVolumeSupervisorFactory ebsVolumeSupervisorFactory, com.atlassian.aws.ec2.EC2InstanceType instanceType)
           
 
Method Summary
 com.atlassian.aws.ec2.RemoteEC2Instance getInstance()
           
 RemoteElasticAgentState getState()
           
 void interruptDelayedTermination()
          Interrupts delayed termination process.
 void start()
           
 void terminate()
           
 void triggerDelayedTermination(long delaySeconds)
          Triggers delayed termination of elastic instance.
 boolean waitToLeaveState(RemoteElasticAgentState state, long timeout, java.util.concurrent.TimeUnit timeUnit)
           
 
Methods inherited from class com.atlassian.bamboo.agent.elastic.server.AbstractRemoteElasticAgent
getRemoteAgent, isAgentLoading, isShutdownable, setAgentLoading, setRemoteAgent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteElasticAgentImpl

public RemoteElasticAgentImpl(ElasticAgentManager manager,
                              ElasticAgentTunnelManager tunnelManager,
                              ErrorHandler errorHandler,
                              com.atlassian.aws.AWSAccount awsAccount,
                              com.atlassian.aws.ec2.EC2Image ec2Image,
                              java.net.URL baseURL,
                              int startupTimeoutSeconds,
                              RemoteElasticAgentListener listener,
                              java.util.concurrent.Executor executor,
                              java.security.KeyStore keyStore,
                              ElasticConfiguration elasticConfiguration,
                              com.atlassian.bamboo.agent.elastic.server.EBSVolumeSupervisorFactory ebsVolumeSupervisorFactory,
                              @NotNull
                              com.atlassian.aws.ec2.EC2InstanceType instanceType)
                       throws java.security.NoSuchAlgorithmException,
                              java.io.IOException,
                              java.security.cert.CertificateException,
                              java.security.KeyStoreException,
                              java.security.KeyManagementException,
                              java.security.UnrecoverableKeyException
Throws:
java.security.NoSuchAlgorithmException
java.io.IOException
java.security.cert.CertificateException
java.security.KeyStoreException
java.security.KeyManagementException
java.security.UnrecoverableKeyException
Method Detail

start

public void start()

terminate

public void terminate()

waitToLeaveState

public boolean waitToLeaveState(RemoteElasticAgentState state,
                                long timeout,
                                java.util.concurrent.TimeUnit timeUnit)
                         throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

getState

public RemoteElasticAgentState getState()

getInstance

public com.atlassian.aws.ec2.RemoteEC2Instance getInstance()

triggerDelayedTermination

public void triggerDelayedTermination(long delaySeconds)
Description copied from interface: RemoteElasticAgent
Triggers delayed termination of elastic instance. Termination is performed asynchronously.

Parameters:
delaySeconds - Number of secods to wait before terminating instance.

interruptDelayedTermination

public void interruptDelayedTermination()
Description copied from interface: RemoteElasticAgent
Interrupts delayed termination process.



Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.