de.esprit.netsuite.server.netch

## Class ServerMessageQueue

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.appsuite.launch.AbstractApplicationObject<S>
    - - de.esprit.netsuite.server.AbstractServerObject<ServerContext>
      - - de.esprit.netsuite.server.netch.ServerMessageQueue

- All Implemented Interfaces:
    ApplicationObject<ServerContext>, SimpleLogSupport, Dumpable, ServerObject<ServerContext>

      public final class ServerMessageQueue
      extends AbstractServerObject<ServerContext>

  This is the main message queue of the server. The messages put into this queue are distributed by a special thread to the current active client `Session`s. From there they are queued further to the client's `ServerNetworkAdapter`s. Note that the latter contains another client specific message queue which actually delivers the messages to the client's network socket.
  Author:
    Rainer Buesch

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ServerMessageQueue(ServerContext serverCtx)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `pingAllClients()` Sends a ping message to all clients in order to verify their existence
    `void` | `sendClientCommand(ClientCommand<?> command)`
    `void` | `sendLogMessage(LogMessageEvent event)`
    `void` | `sendNetEvent(NetEvent event)` Dispatches a custom event to all registered clients.
    `void` | `sendNetEvent(NetEvent event, Group targetGroup)`
    `void` | `sendNetEvent(NetEvent event, SessionId targetSession)`
    `void` | `sendNetEvent(NetEvent event, UserId targetUser)`
    `void` | `sendNetMessage(NetMessage messg)` Dispatches a message to all connected clients.
    `void` | `sendNetMessage(NetMessage messg, Group targetGroup)` Dispatches a message to all users of the given target group.
    `void` | `sendNetMessage(NetMessage messg, SessionId targetSession)` Dispatches a message to the given target session only.
    `void` | `sendNetMessage(NetMessage messg, UserId targetUser)` Dispatches a message to all sessions of the given target user only.
    `void` | `sendProcessEvent(BatchTaskEvent event)`
    `void` | `sendRecordChangeMessage(RemoteRecordChangeEvent e)`
    `void` | `sendRemoteTaskEvent(RemoteTaskEvent event)`
    `void` | `sendServerMessage(ServerNotificationMessage msg)`
    `void` | `sendServerMessage(ServerNotificationMessage msg, Group targetGroup)`
    `void` | `sendServerMessage(ServerNotificationMessage msg, SessionId targetSession)`
    `void` | `sendServerMessage(ServerNotificationMessage msg, UserId targetUser)`
    `void` | `sendStatusEvent(ServerStatusEvent statEvent)` Dispatches a server status event to all registered clients.
    `void` | `sendStatusEvent(ServerStatusEvent statEvent, SessionId targetSession)`
    `void` | `sendSystemEvent(SystemEvent sysEvent)`
    `void` | `sendSystemEvent(SystemEvent sysEvent, Group targetGroup)`
    `void` | `sendSystemEvent(SystemEvent sysEvent, SessionId targetSession)`
    `void` | `sendSystemEvent(SystemEvent sysEvent, UserId targetUser)`

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

      `checkPermission, getServerConfig, getServerContext, getStatisticManager, toString`

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

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

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

- - ### Constructor Detail

    - #### ServerMessageQueue

          public ServerMessageQueue(ServerContext serverCtx)

  - ### Method Detail

    - #### sendRemoteTaskEvent

          public void sendRemoteTaskEvent(RemoteTaskEvent event)

    - #### sendLogMessage

          public void sendLogMessage(LogMessageEvent event)

    - #### sendProcessEvent

          public void sendProcessEvent(BatchTaskEvent event)

    - #### sendServerMessage

          public void sendServerMessage(ServerNotificationMessage msg)

    - #### sendServerMessage

          public void sendServerMessage(ServerNotificationMessage msg,
                               SessionId targetSession)

    - #### sendServerMessage

          public void sendServerMessage(ServerNotificationMessage msg,
                               UserId targetUser)

    - #### sendServerMessage

          public void sendServerMessage(ServerNotificationMessage msg,
                               Group targetGroup)

    - #### sendRecordChangeMessage

          public void sendRecordChangeMessage(RemoteRecordChangeEvent e)

    - #### sendNetMessage

          public void sendNetMessage(NetMessage messg,
                            SessionId targetSession)

      Dispatches a message to the given target session only.

    - #### sendNetMessage

          public void sendNetMessage(NetMessage messg,
                            UserId targetUser)

      Dispatches a message to all sessions of the given target user only.

    - #### sendNetMessage

          public void sendNetMessage(NetMessage messg,
                            Group targetGroup)

      Dispatches a message to all users of the given target group.

    - #### sendStatusEvent

          public void sendStatusEvent(ServerStatusEvent statEvent)

      Dispatches a server status event to all registered clients.

    - #### sendStatusEvent

          public void sendStatusEvent(ServerStatusEvent statEvent,
                             SessionId targetSession)

    - #### sendSystemEvent

          public void sendSystemEvent(SystemEvent sysEvent)

    - #### sendSystemEvent

          public void sendSystemEvent(SystemEvent sysEvent,
                             SessionId targetSession)

    - #### sendSystemEvent

          public void sendSystemEvent(SystemEvent sysEvent,
                             UserId targetUser)

    - #### sendSystemEvent

          public void sendSystemEvent(SystemEvent sysEvent,
                             Group targetGroup)

    - #### sendNetEvent

          public void sendNetEvent(NetEvent event)

      Dispatches a custom event to all registered clients.

    - #### sendNetEvent

          public void sendNetEvent(NetEvent event,
                          SessionId targetSession)

    - #### sendNetEvent

          public void sendNetEvent(NetEvent event,
                          UserId targetUser)

    - #### sendNetEvent

          public void sendNetEvent(NetEvent event,
                          Group targetGroup)

    - #### sendClientCommand

          public void sendClientCommand(ClientCommand<?> command)

    - #### pingAllClients

          public void pingAllClients()

      Sends a ping message to all clients in order to verify their existence

    - #### sendNetMessage

          public void sendNetMessage(NetMessage messg)

      Dispatches a message to all connected clients.

Copyright © 2014 EsprIT-Systems. All Rights Reserved.