com.maverick.ssh
Class ShellEnvironment

java.lang.Object
  extended bycom.maverick.ssh.ShellEnvironment

public class ShellEnvironment
extends java.lang.Object

This class helps the Shell class to determine information about a remote SshClient's environment.

Author:
Lee David Painter

Field Summary
static int OS_AIX
          AIX operating system
static int OS_DARWIN
          Darwin (MAC) operating system
static int OS_FREEBSD
          FreeBSD operating system
static int OS_LINUX
          Linux operating system
static int OS_NETBSD
          NetBSD operating system
static int OS_OPENBSD
          OpenBSD operating system
static int OS_SOLARIS
          Solaris operating system
static int OS_UNKNOWN
          The operating system is unknown
static int OS_WINDOWS
          Windows operating system
 
Method Summary
 java.lang.String getEnvironmentVariable(java.lang.String name)
          Get an environment variable value from the remote shell.
 java.util.Properties getEnvironmentVariables()
           
 java.lang.String getEOL()
          Get the EOL type expected by the remote shell for a complete carriage return.
 java.lang.String getOperatingSystem()
          Returns a descriptive representation of the operating system.
 int getOSType()
          Identifies the operating system type using one of the final static integer values of this class.
 boolean hasEnvironmentVariable(java.lang.String name)
          Check to see if the shell has a variable set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OS_WINDOWS

public static final int OS_WINDOWS
Windows operating system

See Also:
Constant Field Values

OS_LINUX

public static final int OS_LINUX
Linux operating system

See Also:
Constant Field Values

OS_SOLARIS

public static final int OS_SOLARIS
Solaris operating system

See Also:
Constant Field Values

OS_AIX

public static final int OS_AIX
AIX operating system

See Also:
Constant Field Values

OS_DARWIN

public static final int OS_DARWIN
Darwin (MAC) operating system

See Also:
Constant Field Values

OS_FREEBSD

public static final int OS_FREEBSD
FreeBSD operating system

See Also:
Constant Field Values

OS_OPENBSD

public static final int OS_OPENBSD
OpenBSD operating system

See Also:
Constant Field Values

OS_NETBSD

public static final int OS_NETBSD
NetBSD operating system

See Also:
Constant Field Values

OS_UNKNOWN

public static final int OS_UNKNOWN
The operating system is unknown

See Also:
Constant Field Values
Method Detail

getEnvironmentVariables

public java.util.Properties getEnvironmentVariables()

getOSType

public int getOSType()
Identifies the operating system type using one of the final static integer values of this class.

Returns:
int

getOperatingSystem

public java.lang.String getOperatingSystem()
Returns a descriptive representation of the operating system.

Returns:
String

getEnvironmentVariable

public java.lang.String getEnvironmentVariable(java.lang.String name)
Get an environment variable value from the remote shell.

Parameters:
name - String
Returns:
String

hasEnvironmentVariable

public boolean hasEnvironmentVariable(java.lang.String name)
Check to see if the shell has a variable set

Parameters:
name - String
Returns:
boolean

getEOL

public java.lang.String getEOL()
Get the EOL type expected by the remote shell for a complete carriage return.

Returns:
String


Copyright © 2003 3SP LTD. All Rights Reserved.