Top Description Fields Constructors Methods
org.apache.sshd.scp.client

public Class SimpleScpClientImpl

extends AbstractLoggingBean
implements SimpleScpClient
Class Inheritance
All Implemented Interfaces
org.apache.sshd.scp.client.SimpleScpClient, java.nio.channels.Channel, java.io.Closeable, java.lang.AutoCloseable
Imports
java.io.IOException, java.net.SocketAddress, java.security.KeyPair, java.util.Objects, org.apache.sshd.client.session.ClientSession, org.apache.sshd.client.simple.SimpleClient, org.apache.sshd.common.util.ExceptionUtils, org.apache.sshd.common.util.io.functors.IOFunction, org.apache.sshd.common.util.logging.AbstractLoggingBean

TODO Add javadoc
Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
private SimpleClient
private ScpClientCreator
Inherited from org.apache.sshd.common.util.logging.AbstractLoggingBean:
log

Constructor Summary

AccessConstructor and Description
public
public
public

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements java.nio.channels.Channel.close.

Closes this channel.

protected CloseableScpClient
createScpClient(IOFunction<? super SimpleClient, ? extends ClientSession> sessionProvider)

protected CloseableScpClient
public SimpleClient
public ScpClientCreator
public boolean
isOpen()

Implements java.nio.channels.Channel.isOpen.

Tells whether or not this channel is open.

public CloseableScpClient
scpLogin(SocketAddress
The target SocketAddress
target
,
String
Username
username
,
String
Password
password
)

Implements org.apache.sshd.scp.client.SimpleScpClient.scpLogin.

Creates an SCP session using the provided credentials

public CloseableScpClient
scpLogin(SocketAddress
The target SocketAddress
target
,
String
Username
username
,
KeyPair
The KeyPair identity
identity
)

Implements org.apache.sshd.scp.client.SimpleScpClient.scpLogin.

Creates an SCP session using the provided credentials

public void
public void
Inherited from org.apache.sshd.common.util.logging.AbstractLoggingBean:
debugdebugdebugdebugdebugerrorerrorerrorerrorerrorgetSimplifiedLoggerinfoinfowarnwarnwarnwarnwarnwarnwarnwarn

Field Detail

clientInstanceback to summary
private SimpleClient clientInstance
scpClientCreatorback to summary
private ScpClientCreator scpClientCreator

Constructor Detail

SimpleScpClientImplback to summary
public SimpleScpClientImpl()
SimpleScpClientImplback to summary
public SimpleScpClientImpl(SimpleClient client)
SimpleScpClientImplback to summary
public SimpleScpClientImpl(SimpleClient client, ScpClientCreator scpClientCreator)

Method Detail

closeback to summary
public void close() throws IOException

Implements java.nio.channels.Channel.close.

Doc from java.nio.channels.Channel.close.

Closes this channel.

After a channel is closed, any further attempt to invoke I/O operations upon it will cause a ClosedChannelException to be thrown.

If this channel is already closed then invoking this method has no effect.

This method may be invoked at any time. If some other thread has already invoked it, however, then another invocation will block until the first invocation is complete, after which it will return without effect.

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
createScpClientback to summary
protected CloseableScpClient createScpClient(IOFunction<? super SimpleClient, ? extends ClientSession> sessionProvider) throws IOException
createScpClientback to summary
protected CloseableScpClient createScpClient(ClientSession session) throws IOException
getClientback to summary
public SimpleClient getClient()
getScpClientCreatorback to summary
public ScpClientCreator getScpClientCreator()
isOpenback to summary
public boolean isOpen()

Implements java.nio.channels.Channel.isOpen.

Doc from java.nio.channels.Channel.isOpen.

Tells whether or not this channel is open.

Returns:boolean

true if, and only if, this channel is open

Annotations
@Override
scpLoginback to summary
public CloseableScpClient scpLogin(SocketAddress target, String username, String password) throws IOException

Implements org.apache.sshd.scp.client.SimpleScpClient.scpLogin.

Doc from org.apache.sshd.scp.client.SimpleScpClient.scpLogin.

Creates an SCP session using the provided credentials

Parameters
target:SocketAddress

The target SocketAddress

username:String

Username

password:String

Password

Returns:CloseableScpClient

Created CloseableScpClient - Note: closing the client also closes its underlying session

Annotations
@Override
Exceptions
IOException:
If failed to login or authenticate
scpLoginback to summary
public CloseableScpClient scpLogin(SocketAddress target, String username, KeyPair identity) throws IOException

Implements org.apache.sshd.scp.client.SimpleScpClient.scpLogin.

Doc from org.apache.sshd.scp.client.SimpleScpClient.scpLogin.

Creates an SCP session using the provided credentials

Parameters
target:SocketAddress

The target SocketAddress

username:String

Username

identity:KeyPair

The KeyPair identity

Returns:CloseableScpClient

Created CloseableScpClient - Note: closing the client also closes its underlying session

Annotations
@Override
Exceptions
IOException:
If failed to login or authenticate
setClientback to summary
public void setClient(SimpleClient client)
setScpClientCreatorback to summary
public void setScpClientCreator(ScpClientCreator scpClientCreator)