org.eclipse.emf.cdo.session.remote

## Class CDORemoteSessionManager.EventAdapter

- java.lang.Object
- - org.eclipse.net4j.util.container.ContainerEventAdapter<CDORemoteSession>
  - - org.eclipse.emf.cdo.session.remote.CDORemoteSessionManager.EventAdapter

- All Implemented Interfaces:
    java.util.EventListener, IListener
  Enclosing interface:
    CDORemoteSessionManager

      public static class CDORemoteSessionManager.EventAdapter
      extends ContainerEventAdapter<CDORemoteSession>

  A default adapter for all kinds of `remote session` related events.
  Since:
    3.0
  Author:
    Eike Stepper

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `EventAdapter()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `notifyOtherEvent(IEvent event)`
    `protected void` | `onAdded(IContainer<CDORemoteSession> container, CDORemoteSession element)`
    `protected void` | `onClosed(CDORemoteSession remoteSession)` Called if the local session is `subscribed` and a remote session to the same repository as the local session was closed.
    `protected void` | `onLocalSubscriptionChanged(boolean subscribed)` Called if the `subscription mode` of the local session changed.
    `protected void` | `onMessageReceived(CDORemoteSession remoteSession, CDORemoteSessionMessage message)` Called if the local session is `subscribed` and a remote session has `sent` custom data to the local session.
    `protected void` | `onOpened(CDORemoteSession remoteSession)` Called if the local session is `subscribed` and a new remote session was opened to the same repository as the local session.
    `protected void` | `onRemoved(IContainer<CDORemoteSession> container, CDORemoteSession element)`
    `protected void` | `onSubscribed(CDORemoteSession remoteSession)` Called if the local session is `subscribed` and a remote session `subscribed` to the same repository as the local session.
    `protected void` | `onUnsubscribed(CDORemoteSession remoteSession)` Called if the local session is `subscribed` and a remote session `unsubscribed` from the same repository as the local session.

    - ### Methods inherited from class org.eclipse.net4j.util.container.ContainerEventAdapter

      `isWaitForActive, notifyContainerEvent, notifyEvent`

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

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

- - ### Constructor Detail

    - #### EventAdapter

          public EventAdapter()

  - ### Method Detail

    - #### onLocalSubscriptionChanged

          protected void onLocalSubscriptionChanged(boolean subscribed)

      Called if the `subscription mode` of the local session changed.

    - #### onOpened

          protected void onOpened(CDORemoteSession remoteSession)

      Called if the local session is `subscribed` and a new remote session was opened to the same repository as the local session.

    - #### onClosed

          protected void onClosed(CDORemoteSession remoteSession)

      Called if the local session is `subscribed` and a remote session to the same repository as the local session was closed.

    - #### onSubscribed

          protected void onSubscribed(CDORemoteSession remoteSession)

      Called if the local session is `subscribed` and a remote session `subscribed` to the same repository as the local session.

    - #### onUnsubscribed

          protected void onUnsubscribed(CDORemoteSession remoteSession)

      Called if the local session is `subscribed` and a remote session `unsubscribed` from the same repository as the local session.

    - #### onMessageReceived

          protected void onMessageReceived(CDORemoteSession remoteSession,
                                           CDORemoteSessionMessage message)

      Called if the local session is `subscribed` and a remote session has `sent` custom data to the local session.

    - #### notifyOtherEvent

          protected void notifyOtherEvent(IEvent event)

      Overrides:
        `notifyOtherEvent` in class `ContainerEventAdapter<CDORemoteSession>`

    - #### onAdded

          protected final void onAdded(IContainer<CDORemoteSession> container,
                                       CDORemoteSession element)

      Overrides:
        `onAdded` in class `ContainerEventAdapter<CDORemoteSession>`

    - #### onRemoved

          protected final void onRemoved(IContainer<CDORemoteSession> container,
                                         CDORemoteSession element)

      Overrides:
        `onRemoved` in class `ContainerEventAdapter<CDORemoteSession>`

Copyright (c) 2004-2019 Eike Stepper (Loehne, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html