Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| EAC Toolkit 3.2.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.endeca.soleng.eac.toolkit.utility
Class ShellUtility

    java.lang.Object
      com.endeca.soleng.eac.toolkit.base.EacElement
          com.endeca.soleng.eac.toolkit.utility.Utility
              com.endeca.soleng.eac.toolkit.utility.ShellUtility

Direct Known Subclasses:
  CurlUtility, PerlUtility, WSUtility

    public class ShellUtility

extends Utility

ShellUtility extends the Utility object, exposing the fields that make up a shell utility invocation and convenience initializer methods that take all of the arguments required to define a shell utility.

Field Summary

Fields inherited from class com.endeca.soleng.eac.toolkit.utility.Utility
`EAC_MAX_TOKEN_LENGTH, ENDECA_CONF, IS_WINDOWS, WINDOWS_MAX_PATH_LENGTH`

Fields inherited from class com.endeca.soleng.eac.toolkit.base.EacElement
`appName, dataPrefix, eacHost, eacPort, elementId, lockManager, logDir, sslEnabled, workingDir`

Constructor Summary
`ShellUtility()`
`ShellUtility(java.lang.String appName, java.lang.String eacHost, int eacPort, boolean sslEnabled)` Default (inherited) constructor.

Method Summary
`com.endeca.eac.client.RunUtilityType` | `buildEacStub()` Builds a RunUtilityType object to send to the EAC.
`boolean` | `conditionalRun()` Runs the shell utility synchronously, returning true if the invocation completes with no error condition and false if the shell call results in an error condition.
`java.lang.String` | `getCommand()`
`java.lang.String` | `getHostId()`
`void` | `init(java.lang.String token, java.lang.String host, java.lang.String command, java.lang.String workingDir)` Shell initializer.
`protected void` | `initializeEacStub(com.endeca.eac.client.RunShellType stub)`
`protected int` | `maximumAllowedTokenLength()`
`void` | `setCommand(java.lang.String command)`
`void` | `setHostId(java.lang.String hostId)`

Methods inherited from class com.endeca.soleng.eac.toolkit.utility.Utility
`getDirContents, getMaxMissedStatusChecksAllowed, getMaxWaitTimeSeconds, getMinWaitTimeSeconds, getNonNullPositiveLongValueOrDefault, getNumMissedStatusChecks, getSlowPollingIntervalMs, getStandardPollingIntervalMs, getStatus, incrementMissedStatusQueries, initializeEacStub, isActive, isFailed, run, runInParallel, setElementId, setMaxMissedStatusQueriesAllowed, setMaxWaitSeconds, setMinWaitSeconds, setNumMissedStatusChecks, setPollingIntervalMs, setSlowPollingIntervalMs, start, stop, waitForFinished`

Methods inherited from class com.endeca.soleng.eac.toolkit.base.EacElement
`getAppName, getDataPrefix, getEacHost, getEacPort, getElementId, getLockManager, getLogDir, getWorkingDir, isSslEnabled, setAppName, setDataPrefix, setEacHost, setEacPort, setLockManager, setLogDir, setSslEnabled, setWorkingDir`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ShellUtility

    public ShellUtility(java.lang.String appName,
                        java.lang.String eacHost,
                        int eacPort,
                        boolean sslEnabled)
                 throws AppConfigurationException

  Default (inherited) constructor.

  Throws:
    `AppConfigurationException` - If the application name or EAC host is null.

### ShellUtility

    public ShellUtility()

Method Detail

### init

    public void init(java.lang.String token,
                     java.lang.String host,
                     java.lang.String command,
                     java.lang.String workingDir)

  Shell initializer.

  Parameters:
    `token` - ID of the shell utility.
    `host` - ID of the host on which to execute the command.
    `command` - Command string to execute.
    `workingDir` - Working directory from which to execute the command.

### conditionalRun

    public boolean conditionalRun()
                           throws EacCommunicationException,
                                  java.lang.InterruptedException

  Runs the shell utility synchronously, returning true if the invocation completes with no error condition and false if the shell call results in an error condition. This is useful for using the success or failure of a script to determine the conditional application logic in a script.

  Returns:
    Returns true if the shell call returns success and false if the shell call returns failure.
  Throws:
    `EacCommunicationException` - If a communication error occurs while requesting the status of the utility from the EAC.
    `EacComponentControlException` - If an error occurs while trying to start the utility.
    `java.lang.InterruptedException` - If the thread is interrupted while waiting for the utility to finish.

### buildEacStub

    public com.endeca.eac.client.RunUtilityType buildEacStub()

  Description copied from class: `Utility`
  Builds a RunUtilityType object to send to the EAC. If necessary, translates or transforms fields to match the EAC's requirements.

  Overrides:
    `buildEacStub` in class `Utility`
  Returns:
    Returns the RunUtilityType WSDL stub object for this Utility.

### initializeEacStub

    protected void initializeEacStub(com.endeca.eac.client.RunShellType stub)

### getCommand

    public java.lang.String getCommand()

### setCommand

    public void setCommand(java.lang.String command)

### getHostId

    public java.lang.String getHostId()

### setHostId

    public void setHostId(java.lang.String hostId)

### maximumAllowedTokenLength

    protected int maximumAllowedTokenLength()

  Overrides:
    `maximumAllowedTokenLength` in class `Utility`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| EAC Toolkit 3.2.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006, 2012, Oracle and/or its affiliates. All rights reserved.

    @VERSION
    PRODUCT: EAC Toolkit (eacToolkit)
    VERSION: 3.2.2
    BUILD:   NONEDEV
    ARCH_OS: n/a
    DATE:    2012-02-28T13:13:15-0500