Package com.openshift.client

Examples of com.openshift.client.IApplication.stop()


        IApplication app = domain.getApplicationByName(name);
        if (app == null) {
            throw new CamelExchangeException("Application with id " + name + " not found.", exchange);
        } else {
            app.stop();
        }
    }

    protected void doRestart(Exchange exchange, IDomain domain) throws CamelExchangeException {
        String name = exchange.getIn().getHeader(OpenShiftConstants.APPLICATION, getEndpoint().getApplication(), String.class);
View Full Code Here


  public void shouldStopApplication() throws Exception {
    // pre-condition
    IApplication application = ApplicationTestUtils.getOrCreateApplication(domain);

    // operation
    application.stop();
  }

  @Test
  public void shouldStartStoppedApplication() throws Exception {
    // pre-condition
View Full Code Here

  @Test
  public void shouldStartStoppedApplication() throws Exception {
    // pre-condition
    IApplication application = ApplicationTestUtils.getOrCreateApplication(domain);
    application.stop();

    // operation
    application.start();
  }
View Full Code Here

  @Test
  public void shouldStopStoppedApplication() throws Exception {
    // pre-condition
    IApplication application = ApplicationTestUtils.getOrCreateApplication(domain);
    application.stop();

    // operation
    application.stop();

    // verification
View Full Code Here

    // pre-condition
    IApplication application = ApplicationTestUtils.getOrCreateApplication(domain);
    application.stop();

    // operation
    application.stop();

    // verification
    // there's currently no API to verify the application state
  }
View Full Code Here

  @Test
  public void shouldRestartStoppedApplication() throws Exception {
    // pre-condition
    IApplication application = ApplicationTestUtils.getOrCreateApplication(domain);
    application.stop();

    // operation
    application.restart();

    // verification
View Full Code Here

    mockDirector.mockPostApplicationEvent(
        "foobarz", "springeap6", POST_STOP_DOMAINS_FOOBARZ_APPLICATIONS_SPRINGEAP6_EVENT);
    final IApplication app = domain.getApplicationByName("springeap6");

    // operation
    app.stop();

    // verifications
    mockDirector.verifyPostApplicationEvent("foobarz", "springeap6");
  }
View Full Code Here

        .mockPostApplicationEvent(
            "honkabonka2", "springeap6", POST_STOP_DOMAINS_FOOBARZ_APPLICATIONS_SPRINGEAP6_EVENT);
    final IApplication app = domain.getApplicationByName("springeap6");

    // operation
    app.stop(true);

    // verifications
    mockDirector.verifyPostApplicationEvent("foobarz", "springeap6");
  }
View Full Code Here

    protected Object doExecute() throws Exception {
        IOpenShiftConnection connection = getOrCreateConnection();
        for (IDomain domain : connection.getDomains()) {
            if (domainId == null || domainId.equals(domain.getId())) {
                IApplication application = domain.getApplicationByName(applicationName);
                application.stop();
            }
        }
        return null;
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.