Package com.sas.lsaf.execution.session

## Class Session

- java.lang.Object
- - com.sas.lsaf.core.AbstractIdentifiable
  - - com.sas.lsaf.execution.session.Session

- All Implemented Interfaces:
    `Identifiable`, `java.io.Serializable`

      public class Session
      extends AbstractIdentifiable

  The client representation of an execution session.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `Session.SessionEngine` | The enumeration that describes the type of session.
    `static class` | `Session.SessionState` | The session state enumeration that describes the state of a session.
    `static class` | `Session.SessionType` | The enumeration that describes the source that started a session.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Session​(java.lang.String typeId, java.lang.String id, java.util.Date started, java.util.Date ended, Session.SessionType type, Session.SessionState state, java.lang.String userId, java.lang.String submissionLabel, int clientId)` | The initializing constructor.
    `Session​(java.lang.String typeId, java.lang.String id, java.util.Date started, java.util.Date ended, Session.SessionType type, Session.SessionState state, java.lang.String userId, java.lang.String submissionLabel, int clientId, Session.SessionEngine engine, long logErrors, long logWarnings)` | The initializing constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `getClientId()` | Gets the incremental number that is assigned to a session.
    `java.util.Date` | `getDateEnded()` | Gets the date on which the session was ended.
    `java.util.Date` | `getDateStarted()` | Gets the date on which the session was started.
    `Session.SessionEngine` | `getEngine()` | Gets the engine of session.
    `long` | `getLogErrors()` | Gets the number of errors in the log.
    `long` | `getLogWarnings()` | Gets the number of warnings in the log.
    `Session.SessionState` | `getState()` | Gets the state of the session.
    `java.lang.String` | `getSubmissionLabel()` | Gets the label that describes what is executing in the session.
    `Session.SessionType` | `getType()` | Gets the type of the session.
    `java.lang.String` | `getUserId()` | Get the identifier of the user of who created the session.
    `java.lang.String` | `toString()` |

    - ### Methods inherited from class com.sas.lsaf.core.AbstractIdentifiable

      `equals, getId, getTypeId, hashCode`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Session

          public Session​(java.lang.String typeId,
                         java.lang.String id,
                         java.util.Date started,
                         java.util.Date ended,
                         Session.SessionType type,
                         Session.SessionState state,
                         java.lang.String userId,
                         java.lang.String submissionLabel,
                         int clientId)

      The initializing constructor.
      Parameters:
        `typeId` - The object type identifier of the session.
        `id` - The unique identifier of the session.
        `started` - The date on which the session was started.
        `ended` - The date on which the session was ended.
        `type` - The type of the session.
        `state` - The state of the session.
        `userId` - The identifier of the user who created the session.
        `submissionLabel` - The label that describes what is executing in the session.
        `clientId` - The incremental number that is assigned to the session.
      Since:
        1.8

    - #### Session

          public Session​(java.lang.String typeId,
                         java.lang.String id,
                         java.util.Date started,
                         java.util.Date ended,
                         Session.SessionType type,
                         Session.SessionState state,
                         java.lang.String userId,
                         java.lang.String submissionLabel,
                         int clientId,
                         Session.SessionEngine engine,
                         long logErrors,
                         long logWarnings)

      The initializing constructor.
      Parameters:
        `typeId` - The object type identifier of the session.
        `id` - The unique identifier of the session.
        `started` - The date on which the session was started.
        `ended` - The date on which the session was ended.
        `type` - The type of the session.
        `state` - The state of the session.
        `userId` - The identifier of the user who created the session.
        `submissionLabel` - The label that describes what is executing in the session.
        `clientId` - The incremental number that is assigned to the session.
        `engine` - The engine of session.
        `logErrors` - The number of errors in the log.
        `logWarnings` - The number of warnings in the log.
      Since:
        2.4

  - ### Method Detail

    - #### getDateStarted

          public java.util.Date getDateStarted()

      Gets the date on which the session was started.
      Returns:
        The date on which the session was started.

    - #### getDateEnded

          public java.util.Date getDateEnded()

      Gets the date on which the session was ended.
      Returns:
        The date on which the session was ended. Null, if it is not in an ended state.

    - #### getUserId

          public java.lang.String getUserId()

      Get the identifier of the user of who created the session.
      Returns:
        The identifier of the user who created the session.

    - #### getSubmissionLabel

          public java.lang.String getSubmissionLabel()

      Gets the label that describes what is executing in the session.
      Returns:
        The label that describes what is executing in the session.

    - #### getEngine

          public Session.SessionEngine getEngine()

      Gets the engine of session.
      Returns:
        The engine of session.

    - #### getLogErrors

          public long getLogErrors()

      Gets the number of errors in the log.
      Returns:
        The number of errors in the log.

    - #### getLogWarnings

          public long getLogWarnings()

      Gets the number of warnings in the log.
      Returns:
        The number of warnings in the log.

    - #### getType

          public Session.SessionType getType()

      Gets the type of the session.
      Returns:
        The type of the session.

    - #### getState

          public Session.SessionState getState()

      Gets the state of the session.
      Returns:
        The state of the session.

    - #### getClientId

          public int getClientId()

      Gets the incremental number that is assigned to a session.
      Returns:
        The incremental number that is assigned to a session.

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `AbstractIdentifiable`