Groovy Documentation

org.hidetake.gradle.ssh.api.ssh
[Groovy] Interface Connection


interface Connection

A SSH connection.

Authors:
hidetake.org


Method Summary
void cleanup()

Cleanup all channels.

ChannelExec createExecutionChannel(java.lang.String command, ExecutionSettings executionSettings)

Create an execution channel.

ChannelSftp createSftpChannel()

Create a SFTP channel.

ChannelShell createShellChannel(ShellSettings shellSettings)

Create a shell channel.

void executeWhenClosedClosures()

Execute registered closures.

Remote getRemote()

Return the remote host.

boolean isAnyError()

Return if any channel was error.

boolean isAnyPending()

Return if any channel is pending.

void whenClosed(Channel channel, groovy.lang.Closure closure)

Register a closure called when the channel is closed.

 

Method Detail

cleanup

void cleanup()
Cleanup all channels.


createExecutionChannel

ChannelExec createExecutionChannel(java.lang.String command, ExecutionSettings executionSettings)
Create an execution channel.
Parameters:
command
executionSettings
Returns:
a channel


createSftpChannel

ChannelSftp createSftpChannel()
Create a SFTP channel.
Returns:
a channel


createShellChannel

ChannelShell createShellChannel(ShellSettings shellSettings)
Create a shell channel.
Parameters:
shellSettings
Returns:
a channel


executeWhenClosedClosures

void executeWhenClosedClosures()
Execute registered closures.
See Also:
whenClosed(com.jcraft.jsch.Channel, groovy.lang.Closure)


getRemote

Remote getRemote()
Return the remote host.
Returns:
the remote host


isAnyError

boolean isAnyError()
Return if any channel was error.
Returns:
true if at least one was error


isAnyPending

boolean isAnyPending()
Return if any channel is pending.
Returns:
true if at least one is pending


whenClosed

void whenClosed(Channel channel, groovy.lang.Closure closure)
Register a closure called when the channel is closed.
Parameters:
channel - the channel
closure - callback closure


 

Groovy Documentation