Object Management


The object table

Every process keeps a single object table mapping wire representation to their concrete objects or stubs.

    HashMap objTab= new HashMap();
Invariant:

If P has a network reference of object o owned by Q, then objTab.get(o.wrep) gives the concrete object reference on Q and a unique stub on P.


Server and client connections

When the process P has one ore more references of objects owned by Q:


Data structure


Sending a network reference

When sending a network reference obj:

(See method sendNetObj in file Manager.java).


Receiving a network reference

When receiving a wire representation wrep of an object owned by P:

(See method receiveNetObj in file Manager.java).


The manager

(class Manager).


Requesting a method call

(class ServerConnection)


Serving a method call

(class ClientConnection)


Accepting socket connections

The first time an object is exported or imported, the manager launches a thread for accepting connections. This thread:

The client counter part will send the appropiate serializable factory which will create the client connection.

(see method openServerSocket in file Manager.java)


Problems found during the development