package org.realityforge.replicant.server;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.json.JsonObject;

/**
 * A record of a change in channel subscriptions.
 */
public final class ChannelAction
{
  public enum Action
  {
    ADD, REMOVE, UPDATE
  }

  @Nonnull
  private final ChannelAddress _address;
  @Nonnull
  private final Action _action;
  @Nullable
  private final JsonObject _filter;

  public ChannelAction( @Nonnull final ChannelAddress address,
                        @Nonnull final Action action,
                        @Nullable final JsonObject filter )
  {
    _address = address;
    _action = action;
    _filter = filter;
  }

  @Nonnull
  public ChannelAddress getAddress()
  {
    return _address;
  }

  @Nonnull
  public Action getAction()
  {
    return _action;
  }

  @Nullable
  public JsonObject getFilter()
  {
    return _filter;
  }
}

@@ -261,20 +261,312 @@
     
-ADD, REMOVE,
+// The channel has been successfully added.%0A    ADD,%0A    // The channel has been removed. This could be as a result of client request or as a result of the%0A    // filter excluding the graph, as the root instance being deleted%0A    REMOVE,%0A    // The filter associated with the channel has been updated%0A   
  UPD

Add some minimal javadocs