|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD |
public interface SshTool
Method Summary | |
---|---|
void
|
connect()
@throws SshException |
void
|
connect(int maxAttempts)
@param maxAttempts |
int
|
copyToServer(java.util.Map props, java.io.File f, java.lang.String pathAndFileOnRemoteServer)
Copies file, but won't preserve permission of last _access_ date. |
int
|
createFile(java.util.Map props, java.lang.String pathAndFileOnRemoteServer, java.io.InputStream input, long size)
Creates the given file with the given contents. |
int
|
createFile(java.util.Map props, java.lang.String pathAndFileOnRemoteServer, java.lang.String contents)
@see #createFile(Map, String, InputStream, long) |
int
|
createFile(java.util.Map props, java.lang.String pathAndFileOnRemoteServer, byte[] contents)
@see #createFile(Map, String, InputStream, long) |
void
|
disconnect()
|
int
|
execCommands(java.util.Map properties, java.util.List commands, java.util.Map env)
Executes the set of commands using ssh exec, ";" separated (overridable with property 'separator'. |
int
|
execCommands(java.util.Map properties, java.util.List commands)
@see execuCommands(Map, List, Map) |
int
|
execScript(java.util.Map props, java.util.List commands, java.util.Map env)
Executes the set of commands in a shell script; optional property 'out' should be an output stream. |
int
|
execScript(java.util.Map props, java.util.List commands)
@see execScript(Map, List, Map) |
int
|
execShell(java.util.Map props, java.util.List commands)
@deprecated @see execScript(Map, List, Map) |
int
|
execShell(java.util.Map props, java.util.List commands, java.util.Map env)
@deprecated @see execScript(Map, List, Map) |
boolean
|
isConnected()
|
int
|
transferFileFrom(java.util.Map props, java.lang.String pathAndFileOnRemoteServer, java.lang.String pathAndFileOnLocalServer)
@see #createFile(Map, String, InputStream, long) |
int
|
transferFileTo(java.util.Map props, java.io.InputStream input, java.lang.String pathAndFileOnRemoteServer)
@see #createFile(Map, String, InputStream, long) |
Method Detail |
---|
public void connect()
public void connect(int maxAttempts)
public int copyToServer(java.util.Map props, java.io.File f, java.lang.String pathAndFileOnRemoteServer)
To set permissions (or override mod date) use for example 'permissions:"0644"',
public int createFile(java.util.Map props, java.lang.String pathAndFileOnRemoteServer, java.io.InputStream input, long size)
public int createFile(java.util.Map props, java.lang.String pathAndFileOnRemoteServer, java.lang.String contents)
public int createFile(java.util.Map props, java.lang.String pathAndFileOnRemoteServer, byte[] contents)
public void disconnect()
public int execCommands(java.util.Map properties, java.util.List commands, java.util.Map env)
This is generally simpler/preferable to shell, but is not suitable if you need env values whare are only set on a fully-fledged shell.
public int execCommands(java.util.Map properties, java.util.List commands)
public int execScript(java.util.Map props, java.util.List commands, java.util.Map env)
values in environment parameters are wrapped in double quotes, with double quotes escaped
public int execScript(java.util.Map props, java.util.List commands)
public int execShell(java.util.Map props, java.util.List commands)
public int execShell(java.util.Map props, java.util.List commands, java.util.Map env)
public boolean isConnected()
public int transferFileFrom(java.util.Map props, java.lang.String pathAndFileOnRemoteServer, java.lang.String pathAndFileOnLocalServer)
public int transferFileTo(java.util.Map props, java.io.InputStream input, java.lang.String pathAndFileOnRemoteServer)
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.