congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
NativeImageBuildClient.sendRequest
Code IndexAdd Tabnine to your IDE (free)

How to use
sendRequest
method
in
com.oracle.svm.hosted.server.NativeImageBuildClient

Best Java code snippets using com.oracle.svm.hosted.server.NativeImageBuildClient.sendRequest (Showing top 2 results out of 315)

origin: com.oracle.substratevm/svm

public static int run(String[] argsArray, Consumer<byte[]> out, Consumer<byte[]> err) {
  Consumer<String> outln = s -> out.accept((s + "\n").getBytes());
  final List<String> args = new ArrayList<>(Arrays.asList(argsArray));
  if (args.size() < 1) {
    usage(outln);
    return EXIT_FAIL;
  } else if (args.size() == 1 && (args.get(0).equals("--help"))) {
    usage(outln);
    return EXIT_SUCCESS;
  }
  final Optional<String> command = extractArg(args, COMMAND_PREFIX).map(arg -> arg.substring(COMMAND_PREFIX.length()));
  final Optional<Integer> port = NativeImageBuildServer.extractPort(args);
  if (port.isPresent() && command.isPresent()) {
    ServerCommand serverCommand = ServerCommand.valueOf(command.get());
    return sendRequest(serverCommand, String.join(" ", args).getBytes(), port.get(), out, err);
  } else {
    usage(outln);
    return EXIT_FAIL;
  }
}
origin: com.oracle.substratevm/svm-driver

private int sendRequest(Consumer<byte[]> out, Consumer<byte[]> err, ServerCommand serverCommand, String... args) {
  List<String> argList = Arrays.asList(args);
  showVerboseMessage(verboseServer, "Sending to server [");
  showVerboseMessage(verboseServer, serverCommand.toString());
  if (argList.size() > 0) {
    showVerboseMessage(verboseServer, String.join(" \\\n", argList));
  }
  showVerboseMessage(verboseServer, "]");
  int exitCode = NativeImageBuildClient.sendRequest(serverCommand, String.join("\n", argList).getBytes(), port, out, err);
  showVerboseMessage(verboseServer, "Server returns: " + exitCode);
  return exitCode;
}
com.oracle.svm.hosted.serverNativeImageBuildClientsendRequest

Popular methods of NativeImageBuildClient

  • run
  • usage

Popular in Java

  • Making http requests using okhttp
  • getResourceAsStream (ClassLoader)
  • getContentResolver (Context)
  • getExternalFilesDir (Context)
  • String (java.lang)
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Github Copilot alternatives
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