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
- a consistent API for achieving secure access to a remote service
- a consistent API for sending and receiving asynchronous messages
to/from an arbitrary communications service
- 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:
- An ISharedObjectContainer instance is created via
SharedObjectContainerFactory.getDefault().createSharedObjectContainer()
- ISharedObjects are created and added to the
ISharedObjectContainer
- The ISharedObjectContainer 'joins/connects' with a remote
communications group via
ISharedObjectContainer.joinGroup()
- The ISharedObject instances created/added in step #2 above send
asynchronous messages and receive asynchronous
events from the remote services
- 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.
- 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.
- 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.