# Shoal GMS's core client API

Shoal's client API is provided in this package. The entry point for clients using GMS is the `GMSFactory` class. This class provides the APIs for getting a `GroupManagementService` instance for a given member name, group name, member type and configuration. The `GroupManagementService` instance provides methods for registering interest in specific group events.

To process group events on the client side, Shoal makes it easy for clients by providing a single interface that needs to be implemented, namely, the `CallBack` interface. This interface provides a method `processNotification()` that accepts a `Signal` object. Signals are of various types - each type corresponding to a specific group event. Clients register interest in these events by using `addActionFactory()` methods provided in `GroupManagementService`. The clients pass in an instance of a specific `ActionFactory` type to the method.

The `ActionFactory` is a client side artifact with its sub-types corresponding to a specific group event. One can think of the `ActionFactory`-`Action`-`Signal` triplet as a set of one-to-one correspondence objects for a specific type of group event. Clients can choose to implement a specific `ActionFactory` and `Action` type or use the reference implementations provided in the `com.sun.enterprise.ee.cms.impl.client` package.

For instance, clients simply implement the CallBack interface and register for group events using the default implementation of the, say, `FailureNotificationActionFactory` to receive notifications for failure events in the group.