|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.xebialabs.deployit.hostsession.common.AbstractHostSession
public abstract class AbstractHostSession
Abstract base class with common methods used by actual implementations of HostSession.
| Field Summary | |
|---|---|
static long |
MAX_TEMP_RETRIES
|
| Constructor Summary | |
|---|---|
AbstractHostSession(OperatingSystemFamily os,
java.lang.String temporaryDirectoryPath)
|
|
| Method Summary | |
|---|---|
void |
cleanupTemporaryFiles()
|
void |
close()
Closes the host session. |
HostFile |
copyToTemporaryFile(java.io.File localFile)
Copies a local file to a temporary file on the host. |
HostFile |
copyToTemporaryFile(org.springframework.core.io.Resource resource)
Copies a resource to a temporary file on the host. |
protected HostFile |
createSessionTempDirectory(HostFile systemTempDirectory,
java.lang.String name)
|
OperatingSystemFamily |
getHostOperatingSystem()
Return the OS family of the host. |
HostFile |
getTempFile(java.lang.String nameTemplate)
Creates a reference to a temporary file on the host. |
protected HostFile |
getTemporaryDirectory()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.xebialabs.deployit.hostsession.HostSession |
|---|
execute, execute, getFile, getFile, getTempFile, startExecute |
| Field Detail |
|---|
public static final long MAX_TEMP_RETRIES
| Constructor Detail |
|---|
public AbstractHostSession(OperatingSystemFamily os,
java.lang.String temporaryDirectoryPath)
| Method Detail |
|---|
public OperatingSystemFamily getHostOperatingSystem()
HostSession
getHostOperatingSystem in interface HostSessionpublic void close()
HostSessionRuntimeException
close in interface HostSession
protected HostFile getTemporaryDirectory()
throws RuntimeIOException
RuntimeIOException
protected HostFile createSessionTempDirectory(HostFile systemTempDirectory,
java.lang.String name)
public void cleanupTemporaryFiles()
public HostFile getTempFile(java.lang.String nameTemplate)
throws RuntimeIOException
HostSession
getTempFile in interface HostSessionnameTemplate - the template on which to base the name of the temporary file. May be null.
RuntimeIOException - if an I/O error occurs
public HostFile copyToTemporaryFile(java.io.File localFile)
throws RuntimeIOException
HostSession
copyToTemporaryFile in interface HostSessionlocalFile - the local file to copy
RuntimeIOException
public HostFile copyToTemporaryFile(org.springframework.core.io.Resource resource)
throws RuntimeIOException
HostSession
copyToTemporaryFile in interface HostSessionresource - the resource to copy
RuntimeIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||