Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

TransportConfigCallback.java 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright (C) 2011, Roberto Tyley <roberto.tyley@gmail.com> 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.api;
  11. import org.eclipse.jgit.transport.Transport;
  12. /**
  13. * Receives a callback allowing type-specific configuration to be set
  14. * on the Transport instance after it's been created.
  15. * <p>
  16. * This allows consumers of the JGit command API to perform custom
  17. * configuration that would be difficult anticipate and expose on the
  18. * API command builders.
  19. * <p>
  20. * For instance, if a client needs to replace the SshSessionFactorys
  21. * on any SSHTransport used (eg to control available SSH identities),
  22. * they can set the TransportConfigCallback on the JGit API command -
  23. * once the transport has been created by the command, the callback
  24. * will be invoked and passed the transport instance, which the
  25. * client can then inspect and configure as necessary.
  26. */
  27. public interface TransportConfigCallback {
  28. /**
  29. * Add any additional transport-specific configuration required.
  30. *
  31. * @param transport
  32. * a {@link org.eclipse.jgit.transport.Transport} object.
  33. */
  34. void configure(Transport transport);
  35. }