Tabnine Logo
org.codehaus.cargo.container
Code IndexAdd Tabnine to your IDE (free)

How to use org.codehaus.cargo.container

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

origin: apache/geode

/**
 * Human readable description of the container
 *
 * @return The {@link #description} variable along with the state of this {@link #container}
 */
@Override
public String toString() {
 return description + "_<" + container.getState() + ">";
}
origin: apache/geode

public LocalConfiguration getConfiguration() {
 return container.getConfiguration();
}
origin: apache/geode

/**
 * Stops this cargo container
 */
public void stop() {
 if (!container.getState().isStarted()) {
  throw new IllegalArgumentException("Container " + description
    + " failed to stop because it is currently " + container.getState());
 }
 container.stop();
}
origin: apache/geode

/**
 * The container's port for the specified port type
 */
public String getPort(String portType) {
 LocalConfiguration config = getConfiguration();
 config.applyPortOffset();
 if (!container.getState().isStarted())
  throw new IllegalStateException(
    "Container is not started, thus a port has not yet been assigned to the container.");
 return config.getPropertyValue(portType);
}
origin: apache/geode

    ConfigurationType.STANDALONE, this.containerConfigHome.getAbsolutePath());
configuration.setProperty(GeneralPropertySet.LOGGING, loggingLevel);
configuration.setProperty(GeneralPropertySet.JVMARGS,
  "-Djava.security.egd=file:/dev/./urandom");
  .createContainer(install.getInstallId(), ContainerType.INSTALLED, configuration);
container.setHome(install.getHome());
container.setOutput(logDir.getAbsolutePath() + "/container.log");
origin: apache/geode

if (container.getState().isStarted())
 throw new IllegalArgumentException("Container " + description
   + " failed to start because it is currently " + container.getState());
int containerRmiPort = portSupplier.getAsInt();
int tomcatAjpPort = portSupplier.getAsInt();
config.setProperty(ServletPropertySet.PORT, Integer.toString(servletPort));
config.setProperty(GeneralPropertySet.RMI_PORT, Integer.toString(containerRmiPort));
config.setProperty(TomcatPropertySet.AJP_PORT, Integer.toString(tomcatAjpPort));
config.setProperty(GeneralPropertySet.PORT_OFFSET, "0");
int jvmJmxPort = portSupplier.getAsInt();
String jvmArgs = "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=" + jvmJmxPort;
   " --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED";
config.setProperty(GeneralPropertySet.START_JVMARGS, jvmArgs);
container.setConfiguration(config);
 container.start();
} catch (Exception e) {
 throw new RuntimeException(
origin: org.codehaus.cargo/cargo-core-container-jetty

  /**
   * {@inheritDoc}
   */
  @Override
  public void undeployWebApp(Deployable deployable)
  {
    throw new ContainerException("Not supported");
  }
}
origin: codehaus-cargo/cargo

/**
 * {@inheritDoc}
 */
@Override
protected Configuration getConfiguration()
{
  return this.container.getConfiguration();
}
origin: apache/geode

/**
 * set the container's logging level
 */
public void setLoggingLevel(String loggingLevel) {
 this.loggingLevel = loggingLevel;
 LocalConfiguration config = getConfiguration();
 config.setProperty(GeneralPropertySet.LOGGING, loggingLevel);
 container.setConfiguration(config);
}
origin: org.codehaus.cargo/cargo-core-container-tomcat

  /**
   * {@inheritDoc}
   */
  @Override
  protected Configuration getConfiguration()
  {
    return this.container.getConfiguration();
  }
}
origin: codehaus-cargo/cargo

  /**
   * {@inheritDoc}
   */
  @Override
  protected void executeLocalContainerAction()
  {
    this.localContainer.restart();
  }
}
origin: codehaus-cargo/cargo

/**
 * Executes the local container action.
 */
protected void executeLocalContainerAction()
{
  this.localContainer.start();
}
origin: apache/geode

/**
 * Get all active containers
 */
private ArrayList<ServerContainer> getActiveContainers() {
 return getContainersWithState(State.STARTED.toString());
}
origin: codehaus-cargo/cargo

  /**
   * @return the Cargo file utility class
   */
  protected FileHandler getFileHandler()
  {
    return container.getFileHandler();
  }
}
origin: codehaus-cargo/cargo

/**
 * {@inheritDoc}
 */
@Override
public void undeploy(Deployable deployable)
{
  throw new ContainerException("Not supported");
}
origin: apache/geode

public State getState() {
 return container.getState();
}
origin: apache/geode

/**
 * Get the indexes of all active containers
 */
private ArrayList<Integer> getActiveContainerIndexes() {
 return getContainerIndexesWithState(State.STARTED.toString());
}
origin: apache/geode

 /**
  * Get all inactive containers
  */
 private ArrayList<ServerContainer> getInactiveContainers() {
  ArrayList<ServerContainer> inactiveContainers =
    getContainersWithState(State.STOPPED.toString());
  inactiveContainers.addAll(getContainersWithState(State.UNKNOWN.toString()));
  return inactiveContainers;
 }
}
origin: apache/geode

/**
 * Get the indexes of all inactive containers
 */
private ArrayList<Integer> getInactiveContainerIndexes() {
 ArrayList<Integer> indexes = getContainerIndexesWithState(State.STOPPED.toString());
 indexes.addAll(getContainerIndexesWithState(State.UNKNOWN.toString()));
 return indexes;
}
origin: apache/geode

/**
 * Get the positions of the containers with the given container state
 *
 * @param state A string representing the Cargo state a container is in. The possible states can
 *        be found in as static variables in the {@link State} class.
 */
public ArrayList<Integer> getContainerIndexesWithState(String state) {
 if (!(state.equals(State.STARTED.toString()) || state.equals(State.STOPPED.toString())
   || state.equals(State.STARTING.toString()) || state.equals(State.STOPPING.toString())
   || state.equals(State.UNKNOWN.toString()))) {
  throw new IllegalArgumentException(
    "State must be one of the 5 specified cargo state strings (stopped, started, starting, stopping, or unknown). State given was: "
      + state);
 }
 ArrayList<Integer> indexes = new ArrayList<>();
 for (int i = 0; i < numContainers(); i++) {
  if (getContainer(i).getState().toString().equals(state))
   indexes.add(i);
 }
 return indexes;
}
org.codehaus.cargo.container

Most used classes

  • LocalConfiguration
  • InstalledLocalContainer
  • WAR
  • Deployable
  • ContainerException
  • User,
  • Configuration,
  • ResourceUtils,
  • LocalContainer,
  • JvmLauncher,
  • DeployableType,
  • LoggingLevel,
  • Resource,
  • AbstractInstalledLocalContainer,
  • RemoteContainer,
  • ZipURLInstaller,
  • Container,
  • RuntimeConfiguration,
  • JdkUtils
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