Groovy Documentation

org.hidetake.gradle.ssh.api.session
[Groovy] Interface SessionHandler


interface SessionHandler

Handler of operations in a session closure.

Authors:
hidetake.org


Method Summary
java.lang.String execute(java.lang.String command)

Performs an execution operation.

java.lang.String execute(java.lang.String command, groovy.lang.Closure closure)

Performs an execution operation.

java.lang.String execute(java.util.HashMap settings, java.lang.String command)

Performs an execution operation.

java.lang.String execute(java.util.HashMap settings, java.lang.String command, groovy.lang.Closure closure)

Performs an execution operation.

void executeBackground(java.lang.String command)

Performs an execution operation.

void executeBackground(java.util.HashMap settings, java.lang.String command)

Performs an execution operation.

java.lang.String executeSudo(java.lang.String command)

Performs a sudo operation, explicitly providing password for the sudo user.

java.lang.String executeSudo(java.util.HashMap settings, java.lang.String command)

Performs a sudo operation, explicitly providing password for the sudo user.

void get(java.lang.String remote, java.lang.String local)

Performs a GET operation.

Remote getRemote()

Returns remote host for current operation.

void put(java.lang.String local, java.lang.String remote)

Performs a PUT operation.

void shell(java.util.HashMap settings, groovy.lang.Closure closure)

Performs a shell operation.

void shell(groovy.lang.Closure closure)

Performs a shell operation.

 

Method Detail

execute

java.lang.String execute(java.lang.String command)
Performs an execution operation. This method blocks until channel is closed.
Parameters:
command
Returns:
output value of the command


execute

java.lang.String execute(java.lang.String command, groovy.lang.Closure closure)
Performs an execution operation. This method blocks until channel is closed.
Parameters:
command
closure - closure for ExecutionHandler
Returns:
output value of the command


execute

java.lang.String execute(java.util.HashMap settings, java.lang.String command)
Performs an execution operation. This method blocks until channel is closed.
Parameters:
settings - execution settings
command
Returns:
output value of the command


execute

java.lang.String execute(java.util.HashMap settings, java.lang.String command, groovy.lang.Closure closure)
Performs an execution operation. This method blocks until channel is closed.
Parameters:
settings - execution settings
command
closure - closure for ExecutionHandler
Returns:
output value of the command


executeBackground

void executeBackground(java.lang.String command)
Performs an execution operation. This method returns immediately and executes the command concurrently.
Parameters:
command


executeBackground

void executeBackground(java.util.HashMap settings, java.lang.String command)
Performs an execution operation. This method returns immediately and executes the command concurrently.
Parameters:
settings - execution settings
command


executeSudo

java.lang.String executeSudo(java.lang.String command)
Performs a sudo operation, explicitly providing password for the sudo user. This method blocks until channel is closed
Parameters:
command


executeSudo

java.lang.String executeSudo(java.util.HashMap settings, java.lang.String command)
Performs a sudo operation, explicitly providing password for the sudo user. This method blocks until channel is closed
Parameters:
settings - execution settings
command


get

void get(java.lang.String remote, java.lang.String local)
Performs a GET operation. This method blocks until channel is closed.
Parameters:
remote
local


getRemote

Remote getRemote()
Returns remote host for current operation.
Returns:
the remote host


put

void put(java.lang.String local, java.lang.String remote)
Performs a PUT operation. This method blocks until channel is closed.
Parameters:
local
remote


shell

void shell(java.util.HashMap settings, groovy.lang.Closure closure)
Performs a shell operation. This method blocks until channel is closed.
Parameters:
settings - shell settings
closure - closure for ShellHandler
Returns:
output value of the command


shell

void shell(groovy.lang.Closure closure)
Performs a shell operation. This method blocks until channel is closed.
Parameters:
closure - closure for ShellHandler
Returns:
output value of the command


 

Groovy Documentation