de.esprit.netsuite.client.netch

## Class MessageChannel

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.appsuite.launch.AbstractApplicationObject<C>
    - - de.esprit.netsuite.client.AbstractClientObject<C>
      - - de.esprit.netsuite.client.netch.AbstractMessageChannel<ClientContext>
        - - de.esprit.netsuite.client.netch.MessageChannel

- All Implemented Interfaces:
    ApplicationObject<ClientContext>, SimpleLogSupport, Dumpable, ClientObject<ClientContext>, BatchTaskEvent.Source, NetMessageEvent.Source, RemoteRecordChangeEvent.Source, ServerStatusEvent.Source, RemoteTaskEvent.Source

      public final class MessageChannel
      extends AbstractMessageChannel<ClientContext>
      implements NetMessageEvent.Source, ServerStatusEvent.Source, BatchTaskEvent.Source, RemoteRecordChangeEvent.Source, RemoteTaskEvent.Source

  On this instance you can register for incoming messages from the server. The messages are received dispatched synchronously to the listeners although they are received asynchronously by the server.
  Author:
    Rainer Buesch

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MessageChannel(ClientContext clientCtx, ClientNetworkAdapter networkAdapter)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addABOListener(ABOChangeEvent.Listener l)`
    `void` | `addAgentMessageListener(AgentMessageListener l)`
    `void` | `addBatchTaskListener(BatchTaskEvent.Listener l)`
    `void` | `addNetEventListener(GenericEvent.Listener l)`
    `void` | `addNetMessageListener(NetMessageEvent.Listener l)`
    `void` | `addRemoteRecordChangeListener(RemoteRecordChangeEvent.Listener l)`
    `void` | `addRemoteTaskListener(RemoteTaskEvent.Listener l)`
    `void` | `addServerLogMessageListener(LogMessageEvent.Listener l)`
    `void` | `addServerStatusListener(GenericEvent.Listener l)`
    `void` | `addSystemEventListener(GenericEvent.Listener l)`
    `void` | `fireABOEvent(ABOChangeEvent event)` Note: this method must be public because it is called by ABOs from outside in order to fire local events.
    `protected void` | `fireAgentReceived(AsyncAgent agent)`
    `protected void` | `fireBatchTaskEvent(BatchTaskEvent event)`
    `protected void` | `fireNetEvent(NetEvent event)`
    `protected void` | `fireNetMessageReceived(NetMessageEvent event)`
    `protected void` | `fireRemoteRecordChangeEvent(RemoteRecordChangeEvent event)`
    `protected void` | `fireRemoteTaskEvent(RemoteTaskEvent event)`
    `protected void` | `fireServerLogMessageEvent(LogMessageEvent event)`
    `protected void` | `fireServerStatusEvent(ServerStatusEvent event)`
    `protected void` | `fireSystemEvent(SystemEvent event)`
    `void` | `removeABOListener(ABOChangeEvent.Listener l)`
    `void` | `removeAgentMessageListener(AgentMessageListener l)`
    `void` | `removeBatchTaskListener(BatchTaskEvent.Listener l)`
    `void` | `removeNetEventListener(GenericEvent.Listener l)`
    `void` | `removeNetMessageListener(NetMessageEvent.Listener l)`
    `void` | `removeRemoteRecordChangeListener(RemoteRecordChangeEvent.Listener l)`
    `void` | `removeRemoteTaskListener(RemoteTaskEvent.Listener l)`
    `void` | `removeServerLogMessageListener(LogMessageEvent.Listener l)`
    `void` | `removeServerStatusListener(GenericEvent.Listener l)`
    `void` | `removeSystemEventListener(GenericEvent.Listener l)`
    `void` | `setServerShutDownHandler(ServerShutdownEvent.Listener serverShutdownHandler)`

    - ### Methods inherited from class de.esprit.netsuite.client.netch.AbstractMessageChannel

      `addRemoteTaskEventWaiterQueue, close, init, removeRemoteTaskEventWaiterQueue`

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

    - #### MessageChannel

          public MessageChannel(ClientContext clientCtx,
                        ClientNetworkAdapter networkAdapter)

  - ### Method Detail

    - #### addBatchTaskListener

          public void addBatchTaskListener(BatchTaskEvent.Listener l)

      Specified by:
        `addBatchTaskListener` in interface `BatchTaskEvent.Source`

    - #### removeBatchTaskListener

          public void removeBatchTaskListener(BatchTaskEvent.Listener l)

      Specified by:
        `removeBatchTaskListener` in interface `BatchTaskEvent.Source`

    - #### fireBatchTaskEvent

          protected void fireBatchTaskEvent(BatchTaskEvent event)

      Specified by:
        `fireBatchTaskEvent` in class `AbstractMessageChannel<ClientContext>`

    - #### addServerLogMessageListener

          public void addServerLogMessageListener(LogMessageEvent.Listener l)

    - #### removeServerLogMessageListener

          public void removeServerLogMessageListener(LogMessageEvent.Listener l)

    - #### fireServerLogMessageEvent

          protected void fireServerLogMessageEvent(LogMessageEvent event)

      Specified by:
        `fireServerLogMessageEvent` in class `AbstractMessageChannel<ClientContext>`

    - #### addAgentMessageListener

          public void addAgentMessageListener(AgentMessageListener l)

    - #### removeAgentMessageListener

          public void removeAgentMessageListener(AgentMessageListener l)

    - #### fireAgentReceived

          protected void fireAgentReceived(AsyncAgent agent)

      Specified by:
        `fireAgentReceived` in class `AbstractMessageChannel<ClientContext>`

    - #### addNetMessageListener

          public void addNetMessageListener(NetMessageEvent.Listener l)

      Specified by:
        `addNetMessageListener` in interface `NetMessageEvent.Source`

    - #### removeNetMessageListener

          public void removeNetMessageListener(NetMessageEvent.Listener l)

      Specified by:
        `removeNetMessageListener` in interface `NetMessageEvent.Source`

    - #### fireNetMessageReceived

          protected void fireNetMessageReceived(NetMessageEvent event)

      Specified by:
        `fireNetMessageReceived` in class `AbstractMessageChannel<ClientContext>`

    - #### addRemoteTaskListener

          public void addRemoteTaskListener(RemoteTaskEvent.Listener l)

      Specified by:
        `addRemoteTaskListener` in interface `RemoteTaskEvent.Source`

    - #### removeRemoteTaskListener

          public void removeRemoteTaskListener(RemoteTaskEvent.Listener l)

      Specified by:
        `removeRemoteTaskListener` in interface `RemoteTaskEvent.Source`

    - #### fireRemoteTaskEvent

          protected void fireRemoteTaskEvent(RemoteTaskEvent event)

      Specified by:
        `fireRemoteTaskEvent` in class `AbstractMessageChannel<ClientContext>`

    - #### addRemoteRecordChangeListener

          public void addRemoteRecordChangeListener(RemoteRecordChangeEvent.Listener l)

      Specified by:
        `addRemoteRecordChangeListener` in interface `RemoteRecordChangeEvent.Source`

    - #### removeRemoteRecordChangeListener

          public void removeRemoteRecordChangeListener(RemoteRecordChangeEvent.Listener l)

      Specified by:
        `removeRemoteRecordChangeListener` in interface `RemoteRecordChangeEvent.Source`

    - #### fireRemoteRecordChangeEvent

          protected void fireRemoteRecordChangeEvent(RemoteRecordChangeEvent event)

      Specified by:
        `fireRemoteRecordChangeEvent` in class `AbstractMessageChannel<ClientContext>`

    - #### addServerStatusListener

          public void addServerStatusListener(GenericEvent.Listener l)

      Specified by:
        `addServerStatusListener` in interface `ServerStatusEvent.Source`

    - #### removeServerStatusListener

          public void removeServerStatusListener(GenericEvent.Listener l)

      Specified by:
        `removeServerStatusListener` in interface `ServerStatusEvent.Source`

    - #### fireServerStatusEvent

          protected void fireServerStatusEvent(ServerStatusEvent event)

      Specified by:
        `fireServerStatusEvent` in class `AbstractMessageChannel<ClientContext>`

    - #### addSystemEventListener

          public void addSystemEventListener(GenericEvent.Listener l)

    - #### removeSystemEventListener

          public void removeSystemEventListener(GenericEvent.Listener l)

    - #### fireSystemEvent

          protected void fireSystemEvent(SystemEvent event)

      Specified by:
        `fireSystemEvent` in class `AbstractMessageChannel<ClientContext>`

    - #### addNetEventListener

          public void addNetEventListener(GenericEvent.Listener l)

    - #### removeNetEventListener

          public void removeNetEventListener(GenericEvent.Listener l)

    - #### fireNetEvent

          protected void fireNetEvent(NetEvent event)

      Specified by:
        `fireNetEvent` in class `AbstractMessageChannel<ClientContext>`

    - #### addABOListener

          public void addABOListener(ABOChangeEvent.Listener l)

    - #### removeABOListener

          public void removeABOListener(ABOChangeEvent.Listener l)

    - #### fireABOEvent

          public void fireABOEvent(ABOChangeEvent event)

      Note: this method must be public because it is called by ABOs from outside in order to fire local events.
      Specified by:
        `fireABOEvent` in class `AbstractMessageChannel<ClientContext>`

    - #### setServerShutDownHandler

          public void setServerShutDownHandler(ServerShutdownEvent.Listener serverShutdownHandler)

Copyright © 2014 EsprIT-Systems. All Rights Reserved.