### *** This interface provides Binary Compatibility only, not Source Compatibility ***

Package com.sas.services.storedprocess

# Interface ExecutionInterface

All Superinterfaces:
  `ExecutionBaseInterface`, `Remote`

@SASScope("ALL") @BinaryCompatibilityOnly public interface ExecutionInterface extends ExecutionBaseInterface
Deprecated.
Use `Execution2Interface` instead.
This interface describes various aspects associated with the execution of a stored process. See the package description documentation for usage information.

Since:
  1.0

- ## Field Summary

  ### Fields inherited from interface com.sas.services.storedprocess.ExecutionBaseInterface

  `LOG_ALL_LINES, LOG_FORMAT_HTML, LOG_FORMAT_TEXT, STATUS_COMPLETED_WITHOUT_EXCEPTION, STATUS_DESTROYED, STATUS_EXCEPTION_OCCURRED, STATUS_EXECUTING, STATUS_SAS_EXCEPTION_OCCURRED`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `InputStream`
  `getInputStream(Object streamKey)`
  Deprecated.
  Get an input stream.
  `String`
  `getOutputParameter(String name)`
  Deprecated.
  Get the value of the output parameter (SAS macro variable).
  `ResultHints`
  `getResultHints()`
  Deprecated.
  Get the `ResultHints` object used to describe the destination of the results.
  `ResultPackageInterface`
  `getResultPackage()`
  Deprecated.
  Get the package produced by the execution of the stored process.
  `String`
  `getSessionID()`
  Deprecated.
  Get the session id associated with this execution.
  `int`
  `getStatus()`
  Deprecated.
  Get the status of this execution.

  ### Methods inherited from interface com.sas.services.storedprocess.ExecutionBaseInterface

  `destroy, getExceptions, getInputStreamHeader, getOutputStream, getOutputStreamHeader, getSASConditionCode, getStoredProcessAlert, isSynchronous, readSASLog, waitForCompletion, waitForCompletion`

- ## Method Details

  - ### getInputStream

    InputStream getInputStream(Object streamKey) throws IllegalStateException, RemoteException
    Deprecated.
    Get an input stream. Input streams are only available for stored processes with server type `StoredProcessBaseInterface.SERVER_TYPE_STOREDPROCESS` and result type `StoredProcessInterface.RESULT_TYPE_STREAM`.
    Specified by:
      `getInputStream` in interface `ExecutionBaseInterface`
    Parameters:
      `streamKey` - an object whose toString method provides the stream name.
    Returns:
      A serializable object which implements InputStream or null if not available
    Throws:
      `IllegalStateException` - if destroy() has been called.
      `RemoteException` - if a network anomaly is encountered.

  - ### getOutputParameter

    String getOutputParameter(String name) throws TransportException, RemoteException
    Deprecated.
    Get the value of the output parameter (SAS macro variable). If no value is present a null string is returned. If there is a problem obtaining the value a null is returned and an error level message is sent to the logger. For stored processes run on a Workspace server this functionality is unavailable and a null is returned.
    Parameters:
      `name` - the name of the output parameter whose value is desired.
    Returns:
      the value for the name specified.
    Throws:
      `IllegalStateException` - if the status is `ExecutionBaseInterface.STATUS_EXECUTING` or `ExecutionBaseInterface.STATUS_SAS_EXCEPTION_OCCURRED`, or if destroy() has been called.
      `TransportException` - if there is a problem communicating with the SAS server.
      `RemoteException` - if a network anomaly is encountered.

  - ### getResultHints

    ResultHints getResultHints() throws RemoteException
    Deprecated.
    Get the `ResultHints` object used to describe the destination of the results. The destination to which the results are written can be obtained by calling the `ResultHints.getResultLocation()`.
    Returns:
      `StoredProcessInterface.getResultHintsInstance(int)` lists the result types for which a `ResultHints` object will be returned; for other types a null is returned.
    Throws:
      `RemoteException` - if a network anomaly is encountered.
      `IllegalStateException` - if the status is `ExecutionBaseInterface.STATUS_EXECUTING` or `ExecutionBaseInterface.STATUS_SAS_EXCEPTION_OCCURRED`, or if destroy() has been called.

  - ### getResultPackage

    ResultPackageInterface getResultPackage() throws IllegalStateException, RemoteException
    Deprecated.
    Get the package produced by the execution of the stored process. Packages are only available for stored processes with result type `StoredProcessInterface.RESULT_TYPE_TRANSIENT_PACKAGE`, `StoredProcessInterface.RESULT_TYPE_PERMANENT_FILE_PACKAGE` or `StoredProcessInterface.RESULT_TYPE_PERMANENT_WEBDAV_PACKAGE`
    Specified by:
      `getResultPackage` in interface `ExecutionBaseInterface`
    Returns:
      the package or null if there is none.
    Throws:
      `RemoteException` - if a network anomaly is encountered.
      `IllegalStateException` - if the status is `ExecutionBaseInterface.STATUS_EXECUTING` or `ExecutionBaseInterface.STATUS_SAS_EXCEPTION_OCCURRED`, or if destroy() has been called.

  - ### getStatus

    int getStatus() throws RemoteException
    Deprecated.
    Get the status of this execution.

    If the stored process is executing `STATUS_EXECUTING` is returned. If it has completed, one of `STATUS_COMPLETED_WITHOUT_EXCEPTION`, `STATUS_SAS_EXCEPTION_OCCURRED` or `STATUS_EXCEPTION_OCCURRED` is returned depending on how execution terminated.

    Note: if the exception is due to the more specific reasons specified in `STATUS_SAS_EXCEPTION_OCCURRED` then `STATUS_SAS_EXCEPTION_OCCURRED` is returned over the more generic `STATUS_EXCEPTION_OCCURRED`.

    Specified by:
      `getStatus` in interface `ExecutionBaseInterface`
    Throws:
      `IllegalStateException` - if destroy() has been called.
      `RemoteException` - if a network anomaly is encountered.

  - ### getSessionID

    String getSessionID() throws IllegalStateException, RemoteException
    Deprecated.
    Get the session id associated with this execution. Session ids are unique to stored process executions under the StoredProcess server.
    Specified by:
      `getSessionID` in interface `ExecutionBaseInterface`
    Returns:
      the session id or null if there is no session id associated with the execution.
    Throws:
      `RemoteException` - if a network anomaly is encountered.
      `IllegalStateException` - if the status is `ExecutionBaseInterface.STATUS_EXECUTING` or `ExecutionBaseInterface.STATUS_SAS_EXCEPTION_OCCURRED`, or if destroy() has been called.