de.esprit.netsuite.netdata

## Class AbstractSessionServerModel

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.appsuite.launch.AbstractApplicationObject<S>
    - - de.esprit.netsuite.server.AbstractServerObject<S>
      - - de.esprit.netsuite.netdata.AbstractServerModel
        - - de.esprit.netsuite.netdata.AbstractSessionServerModel

- All Implemented Interfaces:
    ApplicationObject, CloseableComponent, Initializable, SimpleLogSupport, Dumpable, LastAccessed, ServerObject, java.lang.AutoCloseable

      public abstract class AbstractSessionServerModel
      extends AbstractServerModel

  This `AbstractServerModel` implementation maintains a list of registered `SessionId`s. Change events are only sent to registered sessions.
  Author:
    Rainer Buesch

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractSessionServerModel(ServerContext serverCtx)`
    `AbstractSessionServerModel(ServerContext serverCtx, java.lang.String modelName)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clearSessionRegistration()`
    `void` | `deregisterSession(SessionId sessId)`
    `SessionId[]` | `getRegisteredSessions()`
    `boolean` | `isSessionRegistered(SessionId sessionId)`
    `void` | `registerSession(SessionId sessId)`
    `protected void` | `sendChangeEvent(NetEvent event)` Overridden to send events only to registered sessions.
    `void` | `setEventsFiltered(boolean isEventsFiltered)` Tells whether events are sent to to all current sessions or registered sessions only.
    `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.

    - ### Methods inherited from class de.esprit.netsuite.netdata.AbstractServerModel

      `checkInitialized, close, getCreatedTs, getLastAccessedTs, getLastAccessorId, getModelName, init, isInitialized, setInitialized, setLastAccessorId`

    - ### Methods inherited from class de.esprit.netsuite.server.AbstractServerObject

      `checkPermission, getServerConfig, getServerContext, getStatisticManager`

    - ### 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, toString`

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

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

- - ### Constructor Detail

    - #### AbstractSessionServerModel

          public AbstractSessionServerModel(ServerContext serverCtx)

    - #### AbstractSessionServerModel

          public AbstractSessionServerModel(ServerContext serverCtx,
                                    java.lang.String modelName)

  - ### Method Detail

    - #### setEventsFiltered

          public void setEventsFiltered(boolean isEventsFiltered)

      Tells whether events are sent to to all current sessions or registered sessions only.

    - #### sendChangeEvent

          protected void sendChangeEvent(NetEvent event)

      Overridden to send events only to registered sessions.
      Overrides:
        `sendChangeEvent` in class `AbstractServerModel`

    - #### deregisterSession

          public void deregisterSession(SessionId sessId)

    - #### isSessionRegistered

          public boolean isSessionRegistered(SessionId sessionId)

    - #### getRegisteredSessions

          public SessionId[] getRegisteredSessions()

    - #### registerSession

          public void registerSession(SessionId sessId)

    - #### clearSessionRegistration

          public void clearSessionRegistration()

    - #### 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 `AbstractServerObject`

    - #### 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 `DumpableObject`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.