com.tibbo.aggregate.common.protocol

## Class RemoteContextManager

- java.lang.Object
- - com.tibbo.aggregate.common.context.DefaultContextManager<ProxyContext>
  - - com.tibbo.aggregate.common.protocol.RemoteContextManager

- All Implemented Interfaces:
    ContextManager<ProxyContext>

      public class RemoteContextManager
      extends DefaultContextManager<ProxyContext>

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RemoteContextManager(AbstractAggreGateDeviceController controller, boolean async, int eventQueueLength)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addDeferredTask(java.lang.String path, java.lang.Runnable task)`
    `protected void` | `addListenerToContext(ProxyContext con, java.lang.String event, ContextEventListener listener, boolean mask, boolean weak)`
    `void` | `addMaskEventListener(java.lang.String mask, java.lang.String event, ContextEventListener listener)` Adds event listener to specified event to every context satisfying context mask.
    `void` | `contextRemoved(ProxyContext con)` Called when context is removed from the context manager
    `ProxyContext` | `createContexts(java.lang.String path)`
    `void` | `executeDeferredTasks(java.lang.String path)`
    `AbstractAggreGateDeviceController` | `getController()`
    `protected void` | `initialize()`
    `protected void` | `removeListenerFromContext(ProxyContext con, java.lang.String event, ContextEventListener listener, boolean mask)`
    `void` | `removeMaskEventListener(java.lang.String mask, java.lang.String event, ContextEventListener listener)` Removes event listener of event 'event' from every context satisfying event mask.
    `protected void` | `sendAddListener(java.lang.String context, java.lang.String event, ContextEventListener listener)`
    `protected void` | `sendRemoveListener(java.lang.String context, java.lang.String event, ContextEventListener listener)`
    `void` | `stop()` 1.

    - ### Methods inherited from class com.tibbo.aggregate.common.context.DefaultContextManager

      `addMaskEventListener, addMaskListenerToContext, contextAdded, contextInfoChanged, eventAdded, eventRemoved, functionAdded, functionRemoved, get, get, getCallerController, getEventQueueLength, getEventQueueStatistics, getEventsProcessed, getEventsScheduled, getExecutorService, getListeners, getMaskListenersMasks, getMaskListenersSize, getPluginDirector, getRoot, isStarted, queue, restart, setExecutorService, setRoot, start, variableAdded, variableRemoved`

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

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

    - ### Methods inherited from interface com.tibbo.aggregate.common.context.ContextManager

      `getFormatCache, getScope, isServerManager`

- - ### Constructor Detail

    - #### RemoteContextManager

          public RemoteContextManager(AbstractAggreGateDeviceController controller,
                                      boolean async,
                                      int eventQueueLength)

  - ### Method Detail

    - #### initialize

          protected void initialize()
                             throws ContextException,
                                    DisconnectionException,
                                    java.io.IOException,
                                    java.lang.InterruptedException,
                                    RemoteDeviceErrorException

      Throws:
        `ContextException`
        `DisconnectionException`
        `java.io.IOException`
        `java.lang.InterruptedException`
        `RemoteDeviceErrorException`

    - #### stop

          public void stop()

      Description copied from interface: `ContextManager`
      1. Stops the event dispatcher
      2. Calls stop() of root context
      Specified by:
        `stop` in interface `ContextManager<ProxyContext>`
      Overrides:
        `stop` in class `DefaultContextManager<ProxyContext>`

    - #### getController

          public AbstractAggreGateDeviceController getController()

    - #### sendAddListener

          protected void sendAddListener(java.lang.String context,
                                         java.lang.String event,
                                         ContextEventListener listener)

    - #### sendRemoveListener

          protected void sendRemoveListener(java.lang.String context,
                                            java.lang.String event,
                                            ContextEventListener listener)

    - #### addListenerToContext

          protected void addListenerToContext(ProxyContext con,
                                              java.lang.String event,
                                              ContextEventListener listener,
                                              boolean mask,
                                              boolean weak)

      Overrides:
        `addListenerToContext` in class `DefaultContextManager<ProxyContext>`

    - #### removeListenerFromContext

          protected void removeListenerFromContext(ProxyContext con,
                                                   java.lang.String event,
                                                   ContextEventListener listener,
                                                   boolean mask)

      Overrides:
        `removeListenerFromContext` in class `DefaultContextManager<ProxyContext>`

    - #### addMaskEventListener

          public void addMaskEventListener(java.lang.String mask,
                                           java.lang.String event,
                                           ContextEventListener listener)

      Description copied from interface: `ContextManager`
      Adds event listener to specified event to every context satisfying context mask.
      Specified by:
        `addMaskEventListener` in interface `ContextManager<ProxyContext>`
      Overrides:
        `addMaskEventListener` in class `DefaultContextManager<ProxyContext>`

    - #### removeMaskEventListener

          public void removeMaskEventListener(java.lang.String mask,
                                              java.lang.String event,
                                              ContextEventListener listener)

      Description copied from interface: `ContextManager`
      Removes event listener of event 'event' from every context satisfying event mask.
      Specified by:
        `removeMaskEventListener` in interface `ContextManager<ProxyContext>`
      Overrides:
        `removeMaskEventListener` in class `DefaultContextManager<ProxyContext>`

    - #### contextRemoved

          public void contextRemoved(ProxyContext con)

      Description copied from interface: `ContextManager`
      Called when context is removed from the context manager
      Specified by:
        `contextRemoved` in interface `ContextManager<ProxyContext>`
      Overrides:
        `contextRemoved` in class `DefaultContextManager<ProxyContext>`

    - #### createContexts

          public ProxyContext createContexts(java.lang.String path)

    - #### addDeferredTask

          public void addDeferredTask(java.lang.String path,
                                      java.lang.Runnable task)

    - #### executeDeferredTasks

          public void executeDeferredTasks(java.lang.String path)