]> source.dussan.org Git - jgit.git/commit
Create RemoteSession interface 83/2583/5
authorRoland Schulz <roland@utk.edu>
Sat, 5 Mar 2011 00:50:14 +0000 (19:50 -0500)
committerChris Aniszczyk <caniszczyk@gmail.com>
Wed, 23 Mar 2011 15:48:08 +0000 (10:48 -0500)
commitccd3d83719eb89045f8b371b041c8e6456d3b403
tree147dfe0ffd45d5427987680498569fd461f70b8f
parent770c733687d9f2f71f30822f9691427bf83b7577
Create RemoteSession interface

The RemoteSession interface operates like a simplified version of
java.lang.Runtime with a single exec method (and a disconnect
method). It returns a java.lang.Process, which should begin execution
immediately. Note that this greatly simplifies the interface for
running commands. There is no longer a connect method, and most
implementations will contain the bulk of their code inside
Process.exec, or a constructor called by Process.exec. (See the
revised implementations of JschSession and ExtSession.)
Implementations can now configure their connections properly without
either ignoring the proper use of the interface or trying to adhere
to an overly strict interface with odd rules about what methods are
called first.  For example, Jsch needs to create the output stream
before executing, which it now does in the process constructor. These
changes should make it much easier to add alternate session
implementations in the future.

Also-by: John D Eblen <jdeblen@comcast.net>
Bug: 336749
CQ: 5004
Change-Id: Iece43632086afadf175af6638255041ccaf2bfbb
Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
org.eclipse.jgit/src/org/eclipse/jgit/transport/DefaultSshSessionFactory.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/transport/JschSession.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteSession.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConfigSessionFactory.java [deleted file]
org.eclipse.jgit/src/org/eclipse/jgit/transport/SshSessionFactory.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/SshTransport.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportSftp.java