com.amazonaws.services.elasticbeanstalk.model.UpdateEnvironmentRequest Java Examples

The following examples show how to use com.amazonaws.services.elasticbeanstalk.model.UpdateEnvironmentRequest. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BeanstalkConnector.java    From cloudml with GNU Lesser General Public License v3.0 5 votes vote down vote up
public void uploadWar(String warFile, String versionLabel, String applicationName, String envName, int timeout) {

        prepareWar(new File(warFile), versionLabel, applicationName);
        journal.log(Level.INFO, ">> Uploading War file!");
        while(timeout-- > 0){
            System.out.print("-");
            try {
                Thread.sleep(1000);
            } catch (InterruptedException ex) {
                Logger.getLogger(BeanstalkConnector.class.getName()).log(Level.SEVERE, null, ex);
            }
            try{

                UpdateEnvironmentResult updateEnvironment
                        = beanstalkClient.updateEnvironment(new UpdateEnvironmentRequest()
                        .withEnvironmentName(envName)
                        .withVersionLabel(versionLabel));
                journal.log(Level.INFO, ">> War uploaded!");
                break;
            }
            catch(com.amazonaws.AmazonServiceException e){

            }

        }

    }