API User's Guide  Class Hierarchy  Index

Package Index

Other Packages

  • package Client
  • package MultiCoordinator
  • package PartyScheduler
  • The abstractions provided by the CORBA-Collaboratory are maintained in the RMI version, except that instead of IDL definitions as the starting point Java Interfaces perform the same function.

    import java.rmi.*;
    
    public interface PartyScheduler extends Remote {
      boolean createParty(String PartyName) throws java.rmi.RemoteException;;
      int getPartyID(String PartyName) throws java.rmi.RemoteException;;
      MultiCoordinator.Coordinator getPartyHandle(int partyID) throws java.rmi.RemoteException;;
    }
    
    
    package MultiCoordinator;
    import java.rmi.*;
    public interface Coordinator extends Remote {
      boolean setMaxClients(int _maxClients) throws java.rmi.RemoteException;
      int getMaxClients()throws java.rmi.RemoteException;
      int numberOfMembers() throws java.rmi.RemoteException;
      String[] getClientNames() throws java.rmi.RemoteException;
      boolean isEmpty() throws java.rmi.RemoteException;
      int register( int clientHashCode, String ClientName,
                    String clientObjRef) 
           throws java.rmi.RemoteException;
      boolean deregister(int clientID) throws java.rmi.RemoteException ;
      boolean broadcast(String Message) throws java.rmi.RemoteException;
      boolean whisper(String Message, int clientID) 
           throws java.rmi.RemoteException;
    }
    

    The RMI based Collaboration is about 30-40% faster than the IIOP solution, howver the advantage RMI holds is blunted by the fact that its a pure Java Solution. RMI-Collab is platform independent, albeit expressed through Java. Nevertheless, CORBA is a platform independent and language independent solution. With CORBA one could have Java Helper classes accessing a C++ implementation of the Party Scheduler. The choice is clear in case of pure Java solutions write to RMI else write to CORBA.