Typically object invocations are unicast. That is, each method invocation is received by atmost one servant object. The Multicast Object Invocations feature is designed for one-to-many one-way communication.
Multicast Group
A multicast group is defined by the class com.sssw.jbroker.api.multicast.Group.It is uniquely identified by a multicast IP Address and a name. A group is created by the createGroup method on Group. Multiple receivers (servants) can belong to a group by using the joinGroup method on the Group. The joinGroup method returns an object reference that can be published to the clients. The clients experience is the the same as with unicast requests - they use the object reference of a given type to invoke methods. The interface for client/server communication can be defined using either IDL or Java RMI. The leaveGroup method on the group can be used by the servant to leave the group and stop receiving invocations from the clients.
Multicast Object Adapter
The Multicast Object Adapter (MOA) is a proprietary Object Adapter for multicast object invocations. The Group APIs like joinGroup, leaveGroup, and createObjref are implemented using the MOA.To generated Stubs/Skeletons for use with MOA, use the -multicast flag on the rmi2iiop or idl2java compilers.
Multicast Object Protocol
The Multicast Object Protocol (MOP) is used to send multicast requests. It uses IP Multicast to multicast requests. The IORs of the multicast object references carry a MOP Profile which contains the Group information (IP address, and name) and the TTL. The port for communication is fixed to 2506.Discovering Services Example
In this example, we will implement a discovery protocol where the client will do a multicast request to request a service. This request will carry a callback registeration object. The service providers will then register back with the client using the provided callback.Bootstrapping using Multicast Example
The createObjref method on the Group can be used to manufacture an object reference of a given type "out of thin air". This is specially useful for the client that wishes to bootstrap itself using services available on the network.In this example, we will reimplement the client from the above example. Instead of getting the multicast object reference from COS Naming, the client will construct it itself using the createObjref method.
Copyright © 1998-2003, Novell, Inc. All rights reserved.