Tabnine Logo
LocalContainer.getState
Code IndexAdd Tabnine to your IDE (free)

How to use
getState
method
in
org.codehaus.cargo.container.LocalContainer

Best Java code snippets using org.codehaus.cargo.container.LocalContainer.getState (Showing top 6 results out of 315)

origin: codehaus-cargo/cargo

/**
 * return whether or not the container is running.
 * 
 * @return true, if the container is running
 */
private boolean isRunning()
{
  return getContainer().getState().equals(State.STARTED)
    || getContainer().getState().equals(State.STARTING);
}
origin: codehaus-cargo/cargo

  @Override
  public void run()
  {
    try
    {
      if (org.codehaus.cargo.container.State.STARTED
        == localContainer.getState()
        ||
        org.codehaus.cargo.container.State.STARTING
        == localContainer.getState())
      {
        localContainer.stop();
      }
    }
    catch (Exception e)
    {
      throw new CargoException("Failed stopping the container.", e);
    }
  }
});
origin: codehaus-cargo/cargo

  @Override
  public void run()
  {
    try 
    {
      if (ContainerRunMojo.this.localContainer != null
        && (org.codehaus.cargo.container.State.STARTED
          == ContainerRunMojo.this.localContainer.getState()
        ||
          org.codehaus.cargo.container.State.STARTING
          == ContainerRunMojo.this.localContainer.getState()))
      {
        ContainerRunMojo.this.localContainer.stop();
      }
    }
    catch (Exception e)
    {
      ContainerRunMojo.this.getLog().warn("Failed stopping the container", e);
    }
  }
});
origin: codehaus-cargo/cargo

  @Override
  public void run()
  {
    try 
    {
      if (org.codehaus.cargo.container.State.STARTED
        == localContainer.getState()
        ||
        org.codehaus.cargo.container.State.STARTING
        == localContainer.getState())
      {
        localContainer.stop();
        waitDeployableMonitor(false);
      }
    }
    catch (Exception e)
    {
      CargoTask.this.log(
        "Failed stopping the container", e, Project.MSG_WARN);
    }
  }
});
origin: org.codehaus.cargo/cargo-ant

  @Override
  public void run()
  {
    try 
    {
      if (org.codehaus.cargo.container.State.STARTED
        == localContainer.getState()
        ||
        org.codehaus.cargo.container.State.STARTING
        == localContainer.getState())
      {
        localContainer.stop();
        waitDeployableMonitor(false);
      }
    }
    catch (Exception e)
    {
      CargoTask.this.log(
        "Failed stopping the container", e, Project.MSG_WARN);
    }
  }
});
origin: codehaus-cargo/cargo

/**
 * {@inheritDoc}
 */
@Override
protected void tearDown()
{
  // Reset context classloader. See the comment in setUp().
  if (getTestData().containerType == ContainerType.EMBEDDED)
  {
    Thread.currentThread().setContextClassLoader(null);
  }
  // Stop any local container that is still running
  if (this.container != null && this.container.getType().isLocal())
  {
    LocalContainer container = (LocalContainer) this.container;
    if (container.getState().isStarted() || container.getState().isStarting())
    {
      getLogger().info(
        "Container is in the [" + container.getState() + "] state"
          + ", shutting it down now", this.getClass().getName());
      container.stop();
    }
  }
  getLogger().info("Ending test [" + getName() + "]", this.getClass().getName());
}
org.codehaus.cargo.containerLocalContainergetState

Popular methods of LocalContainer

  • getConfiguration
  • getId
  • getName
  • stop
  • restart
  • setTimeout
  • start
  • getCapability
  • getFileHandler
  • isAppend
  • setOutput
  • getLogger
  • setOutput,
  • getLogger,
  • getOutput,
  • getTimeout,
  • getType,
  • setAppend,
  • setConfiguration

Popular in Java

  • Running tasks concurrently on multiple threads
  • compareTo (BigDecimal)
  • findViewById (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now