Package org.apache.sshd.scp.client
Class SimpleScpClientImpl
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.scp.client.SimpleScpClientImpl
- All Implemented Interfaces:
Closeable,AutoCloseable,Channel,SimpleScpClient
public class SimpleScpClientImpl
extends org.apache.sshd.common.util.logging.AbstractLoggingBean
implements SimpleScpClient
TODO Add javadoc
- Author:
- Apache MINA SSHD Project
-
Field Summary
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log -
Constructor Summary
ConstructorsConstructorDescriptionSimpleScpClientImpl(org.apache.sshd.client.simple.SimpleClient client) SimpleScpClientImpl(org.apache.sshd.client.simple.SimpleClient client, ScpClientCreator scpClientCreator) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected CloseableScpClientcreateScpClient(org.apache.sshd.client.session.ClientSession session) protected CloseableScpClientcreateScpClient(org.apache.sshd.common.util.io.functors.IOFunction<? super org.apache.sshd.client.simple.SimpleClient, ? extends org.apache.sshd.client.session.ClientSession> sessionProvider) org.apache.sshd.client.simple.SimpleClientbooleanisOpen()scpLogin(SocketAddress target, String username, String password) Creates an SCP session using the provided credentialsscpLogin(SocketAddress target, String username, KeyPair identity) Creates an SCP session using the provided credentialsvoidsetClient(org.apache.sshd.client.simple.SimpleClient client) voidsetScpClientCreator(ScpClientCreator scpClientCreator) Methods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
-
Constructor Details
-
SimpleScpClientImpl
public SimpleScpClientImpl() -
SimpleScpClientImpl
public SimpleScpClientImpl(org.apache.sshd.client.simple.SimpleClient client) -
SimpleScpClientImpl
public SimpleScpClientImpl(org.apache.sshd.client.simple.SimpleClient client, ScpClientCreator scpClientCreator)
-
-
Method Details
-
getClient
public org.apache.sshd.client.simple.SimpleClient getClient() -
setClient
public void setClient(org.apache.sshd.client.simple.SimpleClient client) -
getScpClientCreator
-
setScpClientCreator
-
scpLogin
public CloseableScpClient scpLogin(SocketAddress target, String username, String password) throws IOException Description copied from interface:SimpleScpClientCreates an SCP session using the provided credentials- Specified by:
scpLoginin interfaceSimpleScpClient- Parameters:
target- The targetSocketAddressusername- Usernamepassword- Password- Returns:
- Created
CloseableScpClient- Note: closing the client also closes its underlying session - Throws:
IOException- If failed to login or authenticate
-
scpLogin
public CloseableScpClient scpLogin(SocketAddress target, String username, KeyPair identity) throws IOException Description copied from interface:SimpleScpClientCreates an SCP session using the provided credentials- Specified by:
scpLoginin interfaceSimpleScpClient- Parameters:
target- The targetSocketAddressusername- Usernameidentity- TheKeyPairidentity- Returns:
- Created
CloseableScpClient- Note: closing the client also closes its underlying session - Throws:
IOException- If failed to login or authenticate
-
createScpClient
protected CloseableScpClient createScpClient(org.apache.sshd.common.util.io.functors.IOFunction<? super org.apache.sshd.client.simple.SimpleClient, ? extends org.apache.sshd.client.session.ClientSession> sessionProvider) throws IOException- Throws:
IOException
-
createScpClient
protected CloseableScpClient createScpClient(org.apache.sshd.client.session.ClientSession session) throws IOException - Throws:
IOException
-
isOpen
public boolean isOpen() -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceChannel- Specified by:
closein interfaceCloseable- Throws:
IOException
-