public class SSHConnection extends AbstractConnection
Constructor and Description |
---|
SSHConnection(CVSRoot root,
ConnectionIdentity connectionIdentity)
Creates new SSH connection object.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the connection with the server
|
int |
getPort()
Get the port number, which this connection is actually using.
|
boolean |
isOpen()
Returns true to indicate that the connection was successfully
established.
|
void |
modifyInputStream(ConnectionModifier modifier)
Modify the underlying inputstream
|
void |
modifyOutputStream(ConnectionModifier modifier)
Modify the underlying outputstream
|
void |
open()
Open a connection with the server.
|
void |
verify()
Verifies that we can successfuly connect to the SSH server and run 'cvs server' command on it.
|
getInputStream, getOutputStream, getRepository, setInputStream, setOutputStream, setRepository, verifyProtocol
public SSHConnection(CVSRoot root, ConnectionIdentity connectionIdentity)
socketFactory
- socket factory to use when connecting to SSH serverhost
- host names of the SSH serverport
- port number of SSH serverusername
- SSH usernamepassword
- SSH passwordpublic void open() throws AuthenticationException, CommandAbortedException
Connection
public void verify() throws AuthenticationException
AuthenticationException
- if connection to the SSH server cannot be established (network problem)public void close() throws IOException
Connection
IOException
public boolean isOpen()
Connection
public int getPort()
Connection
public void modifyInputStream(ConnectionModifier modifier) throws IOException
Connection
modifier
- the connection modifier that performs the modificationsIOException
- if an error occurs modifying the streamspublic void modifyOutputStream(ConnectionModifier modifier) throws IOException
Connection
modifier
- the connection modifier that performs the modificationsIOException
- if an error occurs modifying the streamsCopyright © 2016. All rights reserved.