Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] SshSessionFactory configuration

If you're using the JGit Command API classes, is TransportConfigCallback  sufficient for your needs?

For instance, if a client needs to replace the SshSessionFactorys on any SSHTransport used, they can set the TransportConfigCallback on the JGit API command - once the transport has been created by the command, the callback will be invoked and passed the transport instance, which the client can then inspect and configure as necessary.

On 5 Apr 2014 04:13, "Marshall Pierce" <marshall@xxxxxxxxxxx> wrote:
Hi folks,
Unless I'm missing something, the only way to specify the SshSessionFactory to use is to SshSessionFactory.setInstance(). This is static, which is a little unfortunate. (Also, the underlying static field isn't volatile, so writes to it have no cross-thread memory visibility guarantees.)

I'd like to make it configurable on a more granular level. It looks like the TransportCommand subclasses are a good place to be able to configure this. Alternately, perhaps it would be nice to specify it on the Git instance. (Or, maybe both.) Do people have suggestions on an approach to making this configurable?

jgit-dev mailing list

Back to the top