|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.xebialabs.deployit.hostsession.common.AbstractHostSession
com.xebialabs.deployit.hostsession.local.LocalHostSession
public class LocalHostSession
A session to the local host.
| Field Summary |
|---|
| Fields inherited from class com.xebialabs.deployit.hostsession.common.AbstractHostSession |
|---|
MAX_TEMP_RETRIES |
| Constructor Summary | |
|---|---|
LocalHostSession(OperatingSystemFamily os,
java.lang.String temporaryDirectoryPath)
Constructs a session to the local host. |
|
| Method Summary | |
|---|---|
int |
execute(CommandExecutionCallbackHandler handler,
java.util.Map<java.lang.String,java.lang.String> inputResponse,
java.lang.String... commandLine)
Executes a command and responds to any output with the provided responses. |
int |
execute(CommandExecutionCallbackHandler handler,
java.lang.String... commandLine)
Executes a command with its arguments. |
HostFile |
getFile(HostFile parent,
java.lang.String child)
Creates a reference to a file in a directory on the host. |
HostFile |
getFile(java.lang.String hostPath)
Creates a reference to a file on the host. |
HostFile |
getTempFile(java.lang.String prefix,
java.lang.String suffix)
Creates a reference to a temporary file on the host. |
CommandExecution |
startExecute(java.lang.String... commandLine)
Starts the execution of a command and gives the caller full control over the execution. |
java.lang.String |
toString()
Returns a string representation of the local host session in scp syntax: localhost: |
| Methods inherited from class com.xebialabs.deployit.hostsession.common.AbstractHostSession |
|---|
cleanupTemporaryFiles, close, copyToTemporaryFile, copyToTemporaryFile, createSessionTempDirectory, getHostOperatingSystem, getTempFile, getTemporaryDirectory |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.xebialabs.deployit.hostsession.HostSession |
|---|
close, copyToTemporaryFile, copyToTemporaryFile, getHostOperatingSystem, getTempFile |
| Constructor Detail |
|---|
public LocalHostSession(OperatingSystemFamily os,
java.lang.String temporaryDirectoryPath)
| Method Detail |
|---|
public HostFile getTempFile(java.lang.String prefix,
java.lang.String suffix)
throws RuntimeIOException
HostSession
getTempFile in interface HostSessionprefix - the prefix string to be used in generating the file's name; must be at least three characters longsuffix - the suffix string to be used in generating the file's name; may be null, in which case
the suffix ".tmp" will be used
RuntimeIOException - if an I/O error occurs
public HostFile getFile(java.lang.String hostPath)
throws RuntimeIOException
HostSession
getFile in interface HostSessionhostPath - the path of the host
RuntimeIOException - if an I/O error occurs
public HostFile getFile(HostFile parent,
java.lang.String child)
throws RuntimeIOException
HostSession
getFile in interface HostSessionparent - the reference to the directory on the hostchild - the name of the file in the directory
RuntimeIOException - if an I/O error occurs
public int execute(CommandExecutionCallbackHandler handler,
java.lang.String... commandLine)
throws RuntimeIOException
HostSession
execute in interface HostSessionhandler - the callback handler that will be invoked when the executed command generated output.commandLine - the command line to execute. The first element is the command, the other elements are its arguments.
RuntimeIOException - if an I/O error occurs
public int execute(CommandExecutionCallbackHandler handler,
java.util.Map<java.lang.String,java.lang.String> inputResponse,
java.lang.String... commandLine)
HostSession
execute in interface HostSessionhandler - the callback handler that will be invoked when the executed command generated output.inputResponse - expected output and the response to sendcommandLine - the command line to execute. The first element is the command, the other elements are its arguments.
public CommandExecution startExecute(java.lang.String... commandLine)
HostSession
startExecute in interface HostSessioncommandLine - the command line to execute. The first element is the command, the other elements are its arguments.
public java.lang.String toString()
localhost:
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||