public ClientChannel(ClientConnection connection, boolean channelEventsEnabled,
EventManager eventManager, boolean remoteEventsOptional)
throws CayenneRuntimeException {
this.connection = connection;
this.diffCompressor = new GraphDiffCompressor();
this.eventManager = eventManager;
this.channelEventsEnabled = eventManager != null && channelEventsEnabled;
if (!remoteEventsOptional) {
setupRemoteChannelListener();