Tabnine Logo
LocalPlatform
Code IndexAdd Tabnine to your IDE (free)

How to use
LocalPlatform
in
com.oracle.tools.runtime

Best Java code snippets using com.oracle.tools.runtime.LocalPlatform (Showing top 4 results out of 315)

origin: com.oracle.tools/oracle-tools-runtime-vagrant

/**
 * Execute the application defined by the specified {@link SimpleApplicationSchema}.
 *
 * @param schema  the {@link SimpleApplicationSchema} defining the application to execute
 */
protected void execute(SimpleApplicationSchema schema)
{
  LocalPlatform platform = LocalPlatform.getInstance();
  try (Application application = platform.realize("Vagrant", schema, new SystemApplicationConsole()))
  {
    application.waitFor();
  }
  catch (Exception e)
  {
    throw new RuntimeException("Error executing Vagrant command", e);
  }
}
origin: com.oracle.tools/oracle-tools-runtime-remote

/**
 * Start the HTTP server that will be used to serve the artifacts
 * to be deployed.
 *
 * @param executor  the {@link Executor} to pass to the {@link HttpServer}
 * @param artifacts a {@link Map} of {@link DeploymentArtifact}s to deploy
 *                  keyed by the URL path for each artifact
 *
 */
protected HttpServer createServer(ExecutorService                 executor,
                 Map<String, DeploymentArtifact> artifacts)
{
  try
  {
    LocalPlatform platform = LocalPlatform.getInstance();
    InetAddress   address  = NetworkHelper.getFeasibleLocalHost();
    int           port     = platform.getAvailablePorts().next();
    HttpServer    server   = HttpServer.create(new InetSocketAddress(address, port), 0);
    server.createContext("/", new ArtifactsHandler(artifacts, options.asArray()));
    server.setExecutor(executor);
    server.start();
    return server;
  }
  catch (IOException e)
  {
    throw new RuntimeException("Unable to create HTTP server", e);
  }
}
origin: com.oracle.tools/oracle-tools-runtime-remote

remoteDebugPort = LocalPlatform.getInstance().getAvailablePorts().next();
origin: com.oracle.tools/oracle-tools-runtime-vagrant

LocalPlatform           platform = LocalPlatform.getInstance();
  Application application = platform.realize("Vagrant", schema, console))
com.oracle.tools.runtimeLocalPlatform

Most used methods

  • getInstance
  • getAvailablePorts
  • realize

Popular in Java

  • Parsing JSON documents to java classes using gson
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • requestLocationUpdates (LocationManager)
  • findViewById (Activity)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top plugins for WebStorm
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