Eclipse Communication Framework (ECF)

SharedObjectContainer Lifecycle - DRAFT

SharedObjectContainers can provide access to arbitrary communications protocols. So, for example, communication with a remote instant messaging client, a server-based web service, or a distributed multi-point application can all be represented through an implementation of a SharedObjectContainer that understands the specific application-level protocol or protocols necessary to communicate with a given service or set of services. The primary role of the SharedObjectContainer is to provide SharedObjects with

  1. a consistent API for achieving secure access to a remote service
  2. a consistent API for sending and receiving asynchronous messages to/from an arbitrary communications service
  3. consistent information about message reliability and group membership
ECF also defines an extensible factory for creating ISharedObjectContainer instances called SharedObjectContainerFactory.

The lifecycle of a ISharedObjectContainer is typically as follows:
  1. An ISharedObjectContainer instance is created via SharedObjectContainerFactory.getDefault().createSharedObjectContainer()
  2. ISharedObjects are created and added to the ISharedObjectContainer
  3. The ISharedObjectContainer 'joins/connects' with a remote communications group via ISharedObjectContainer.joinGroup()
  4. The ISharedObject instances created/added in step #2 above send asynchronous messages and receive asynchronous events from the remote services
  5. ISharedObject implementation code presents/manages user interfaces, handles user input, keeps local state, communicates with replicas or external services, exposes/introduces local Eclipse-provided services to remotes, etc.
  6. When the ISharedObjectContainer is no longer needed for communication, the ISharedObjectContainer can be directed to leave the group, or leave the group on its own.
  7. When the ISharedObjectContainer is no longer needed at all the ISharedObjectContainer.dispose() method can be called to free any resources managed by the container or it's associated ISharedObjects.