de.esprit.netsuite.rtask

## Class RemoteTaskEvent

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.common.util.TransferableObject
    - - de.esprit.common.gui.event.GenericEvent
      - - de.esprit.appsuite.task.TaskEvent
        - - de.esprit.netsuite.rtask.RemoteTaskEvent

- All Implemented Interfaces:
    DeepCloneable, Dumpable, NetEvent, java.io.Serializable, java.lang.Cloneable

      public class RemoteTaskEvent
      extends TaskEvent
      implements NetEvent

  This event is used for notifying the state of remotely running tasks.
  Author:
    Rainer Buesch
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `RemoteTaskEvent.Listener`
    `static interface` | `RemoteTaskEvent.Source`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RemoteTaskEvent(RemoteRunStateFlag stateFlag)`
    `RemoteTaskEvent(RemoteRunStateFlag stateFlag, java.lang.Exception error)` Constructor for a FAILED event
    `RemoteTaskEvent(RemoteRunStateFlag stateFlag, java.lang.Object result)` Constructor for a SUCCEEDED event
    `RemoteTaskEvent(RemoteRunStateFlag stateFlag, java.lang.Object info, int step, int maxSteps, java.lang.String currMessg)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `DBTimestamp` | `getEventTimestamp()` Returns the timestamp when the event was created
    `SessionId` | `getKillerSessionId()`
    `RemoteRunStateFlag` | `getRunStateFlag()`
    `SessionId` | `getSessionId()` Returns the SessionId of the client who caused the change.
    `RemoteTaskId` | `getTaskId()`
    `boolean` | `isFaked()` Tells whether this is a faked event.
    `boolean` | `isPlayBack()` Tells whether this is a playback event.
    `void` | `setFaked(boolean isFaked)` Marks this as a faked event.
    `void` | `setPlayBack(boolean isPlayBack)` Marks this as a playback event.
    `void` | `setSessionId(SessionId sessId)`
    `void` | `setWasCausedByMe(boolean wasCausedByMe)` Tells whether the event was caused by the client himself.
    `DumpString` | `toDumpString(DumpString s)` This method allows subclasses to add values to the existing DumpString of the superclass.
    `ToString` | `toString(ToString s)` This method allows subclasses to add values to the existing ToString of the superclass.
    `boolean` | `wasCausedByMe()` Tells whether the event was caused by the client himself.

    - ### Methods inherited from class de.esprit.appsuite.task.TaskEvent

      `getChildCount, getChildNestingDepth, getCurrentChild, getError, getMaxChildTasks, getMaxProgressSteps, getProgressMessage, getProgressPercentage, getProgressStep, getResult, getRunState, getTaskName, isCancellable, isCancelled, isChildEvent, isChildFinished, isChildStarted, isChildSucceeded, isFailed, isFinished, isProgress, isRunning, isStarted, isSucceeded, wasCancelled, wasFailed, wasSucceeded`

    - ### Methods inherited from class de.esprit.common.util.TransferableObject

      `clone, deepClone`

    - ### Methods inherited from class de.esprit.common.util.DumpableObject

      `configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toString`

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

      `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### RemoteTaskEvent

          public RemoteTaskEvent(RemoteRunStateFlag stateFlag,
                         java.lang.Exception error)

      Constructor for a FAILED event

    - #### RemoteTaskEvent

          public RemoteTaskEvent(RemoteRunStateFlag stateFlag,
                         java.lang.Object result)

      Constructor for a SUCCEEDED event

    - #### RemoteTaskEvent

          public RemoteTaskEvent(RemoteRunStateFlag stateFlag,
                         java.lang.Object info,
                         int step,
                         int maxSteps,
                         java.lang.String currMessg)

    - #### RemoteTaskEvent

          public RemoteTaskEvent(RemoteRunStateFlag stateFlag)

  - ### Method Detail

    - #### setFaked

          public void setFaked(boolean isFaked)

      Marks this as a faked event.
      See Also:
        `isFaked()`

    - #### isFaked

          public boolean isFaked()

      Tells whether this is a faked event. An event is faked when it has not been created on the server but was artificially created on the client instead. When the server connection is lost, the client will create a faked FINISHED event in order to ensure a clean task termination.

    - #### isPlayBack

          public boolean isPlayBack()

      Tells whether this is a playback event. A playback event is one that has been stored by a `JournalTask` and which is being sent to a client after having reattatched to it.

    - #### setPlayBack

          public void setPlayBack(boolean isPlayBack)

      Marks this as a playback event.
      See Also:
        `isPlayBack()`

    - #### getEventTimestamp

          public DBTimestamp getEventTimestamp()

      Returns the timestamp when the event was created

    - #### getRunStateFlag

          public RemoteRunStateFlag getRunStateFlag()

      Overrides:
        `getRunStateFlag` in class `TaskEvent`

    - #### getTaskId

          public RemoteTaskId getTaskId()

      Overrides:
        `getTaskId` in class `TaskEvent`

    - #### getKillerSessionId

          public SessionId getKillerSessionId()

    - #### setSessionId

          public void setSessionId(SessionId sessId)

    - #### getSessionId

          public SessionId getSessionId()

      Description copied from interface: `NetEvent`
      Returns the SessionId of the client who caused the change.
      Specified by:
        `getSessionId` in interface `NetEvent`

    - #### setWasCausedByMe

          public void setWasCausedByMe(boolean wasCausedByMe)

      Description copied from interface: `NetEvent`
      Tells whether the event was caused by the client himself.
      Specified by:
        `setWasCausedByMe` in interface `NetEvent`
      See Also:
        `NetEvent.wasCausedByMe()`

    - #### wasCausedByMe

          public boolean wasCausedByMe()

      Description copied from interface: `NetEvent`
      Tells whether the event was caused by the client himself.
      Specified by:
        `wasCausedByMe` in interface `NetEvent`
      See Also:
        `NetEvent.setWasCausedByMe(boolean)`

    - #### toString

          public ToString toString(ToString s)

      Description copied from interface: `Dumpable`
      This method allows subclasses to add values to the existing ToString of the superclass. Usually subclasses only need to override this method.
      Specified by:
        `toString` in interface `Dumpable`
      Overrides:
        `toString` in class `TaskEvent`

    - #### toDumpString

          public DumpString toDumpString(DumpString s)

      Description copied from interface: `Dumpable`
      This method allows subclasses to add values to the existing DumpString of the superclass. Usually subclasses only need to override this method.
      Specified by:
        `toDumpString` in interface `Dumpable`
      Overrides:
        `toDumpString` in class `TaskEvent`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.