de.esprit.netsuite.client.gui.rtask

## Class RemoteTaskProgressEventForwarder<S extends ServerContext,C extends CoClientContext>

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.appsuite.launch.AbstractApplicationObject<C>
    - - de.esprit.netsuite.client.AbstractClientObject<C>
      - - de.esprit.netsuite.client.gui.rtask.RemoteTaskDefaultEventForwarder<S,C>
        - - de.esprit.netsuite.client.gui.rtask.RemoteTaskProgressEventForwarder<S,C>

- All Implemented Interfaces:
    ApplicationObject<C>, SimpleLogSupport, Dumpable, ClientObject<C>, RemoteTaskEventForwarder, ServerObject<S>

      public class RemoteTaskProgressEventForwarder<S extends ServerContext,C extends CoClientContext>
      extends RemoteTaskDefaultEventForwarder<S,C>

  This implementation is supposed to control PROGRESS events of an `AbstractOsProcessTask` in a special way. It works like `RemoteTaskDefaultEventForwarder` but PROGRESS events are send only to registered sessions in order to reduce mass traffic. PROGRESS event generation of the remote task is switched on/off depending on whether any session is registered as a progress listener.
  Author:
    Rainer Buesch

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RemoteTaskProgressEventForwarder(C coClientCtx, AbstractClientEDT task)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `deregisterProgressListenSession(SessionId sessionId)` Switches progress of the remote task off when no session is registered any more.
    `void` | `forwardEvent(RemoteTaskEvent event)` Forwards progress events only to registered clients directly without bothering any other clients.
    `void` | `registerProgressListenSession(SessionId sessionId)` Switches progress of the remote task on as soon as any session gets registered.

    - ### Methods inherited from class de.esprit.netsuite.client.gui.rtask.RemoteTaskDefaultEventForwarder

      `getServerContext, sendEvent`

    - ### Methods inherited from class de.esprit.netsuite.client.AbstractClientObject

      `getClientConfig, getClientContext`

    - ### Methods inherited from class de.esprit.appsuite.launch.AbstractApplicationObject

      `getApplicationContext, getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel`

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

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

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

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

- - ### Constructor Detail

    - #### RemoteTaskProgressEventForwarder

          public RemoteTaskProgressEventForwarder(C coClientCtx,
                                          AbstractClientEDT task)

  - ### Method Detail

    - #### registerProgressListenSession

          public void registerProgressListenSession(SessionId sessionId)
                                             throws java.lang.Exception

      Switches progress of the remote task on as soon as any session gets registered.
      Throws:
        `java.lang.Exception`

    - #### deregisterProgressListenSession

          public void deregisterProgressListenSession(SessionId sessionId)
                                               throws java.lang.Exception

      Switches progress of the remote task off when no session is registered any more.
      Throws:
        `java.lang.Exception`

    - #### forwardEvent

          public void forwardEvent(RemoteTaskEvent event)

      Forwards progress events only to registered clients directly without bothering any other clients. Note that only progress events are handled specially in order to prevent mass data processing.
      Specified by:
        `forwardEvent` in interface `RemoteTaskEventForwarder`
      Overrides:
        `forwardEvent` in class `RemoteTaskDefaultEventForwarder<S extends ServerContext,C extends CoClientContext>`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.