選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

RemoteSession2.java 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Copyright (C) 2020, Thomas Wolf <thomas.wolf@paranor.ch> and others
  3. *
  4. * This program and the accompanying materials are made available under the
  5. * terms of the Eclipse Distribution License v. 1.0 which is available at
  6. * https://www.eclipse.org/org/documents/edl-v10.php.
  7. *
  8. * SPDX-License-Identifier: BSD-3-Clause
  9. */
  10. package org.eclipse.jgit.transport;
  11. import java.io.IOException;
  12. import java.util.Map;
  13. /**
  14. * A {@link RemoteSession} that supports passing environment variables to
  15. * commands.
  16. *
  17. * @since 5.11
  18. */
  19. public interface RemoteSession2 extends RemoteSession {
  20. /**
  21. * Creates a new remote {@link Process} to execute the given command. The
  22. * returned process's streams exist and are connected, and execution of the
  23. * process is already started.
  24. *
  25. * @param commandName
  26. * command to execute
  27. * @param environment
  28. * environment variables to pass on
  29. * @param timeout
  30. * timeout value, in seconds, for creating the remote process
  31. * @return a new remote process, already started
  32. * @throws java.io.IOException
  33. * may be thrown in several cases. For example, on problems
  34. * opening input or output streams or on problems connecting or
  35. * communicating with the remote host. For the latter two cases,
  36. * a TransportException may be thrown (a subclass of
  37. * java.io.IOException).
  38. */
  39. Process exec(String commandName, Map<String, String> environment,
  40. int timeout) throws IOException;
  41. }