code: public void dispatchEvent(IEvent e) {
          if (e instanceof ISharedObjectMessage || e.getType() == IEvent.Type.SHARED_OBJECT) {
              ISharedObjectMessage msg = (ISharedObjectMessage) e;
              if (msg.hasSource()) {
                  beginUpdate(msg.getSource());
              } else {
                  beginUpdate();
              }
              try {
                  for (ISharedObjectEvent event : msg.getEvents()) {
                      switch (event.getType()) {
                          case CLIENT_INITIAL_DATA:
                              initialSyncReceived = true;
                              notifyConnect();
                              break;
                          case CLIENT_CLEAR_DATA:
                              attributes.clear();
                              notifyClear();
                              break;
                          case CLIENT_DELETE_DATA:
                          case CLIENT_DELETE_ATTRIBUTE:
                              attributes.remove(event.getKey());
                              notifyDelete(event.getKey());
                              break;
                          case CLIENT_SEND_MESSAGE:
                              notifySendMessage(event.getKey(), (List<?>) event.getValue());
                              break;
                          case CLIENT_UPDATE_DATA:
                              attributes.putAll((Map<String, Object>) event.getValue());
                              notifyUpdate(event.getKey(), (Map<String, Object>) event.getValue());
                              break;
                          case CLIENT_UPDATE_ATTRIBUTE:
                              Object val = event.getValue();
                              // null values are not allowed in concurrent hash maps
                              if (val != null) {
                                  attributes.put(event.getKey(), val);
                              }
                              // we will however send the null out to the subscribers
                              notifyUpdate(event.getKey(), val);
                              break;
                          default:
                              log.warn("Unknown SO event: {}", event.getType());
                      }
                  }
              } finally {
                  endUpdate();
              }
          }
      }
docs: {@inheritDoc}