code: public void init (DObjectManager omgr, final int cloid, Client client)
      {
          // sanity check
          if (_clobj != null) {
              log.warning("Zoiks, client object around during invmgr init!");
              cleanup();
          }
  
          // keep these for later
          _omgr = omgr;
          _client = client;
  
          // add ourselves as a subscriber to the client object
          _omgr.subscribeToObject(cloid, new Subscriber<ClientObject>() {
              public void objectAvailable (ClientObject clobj) {
                  // add ourselves as an event listener
                  clobj.addListener(InvocationDirector.this);
  
                  // keep a handle on this bad boy
                  _clobj = clobj;
  
                  // assign a mapping to already registered receivers
                  assignReceiverIds();
  
                  // let the client know that we're ready to go now that we've got our subscription
                  // to the client object
                  _client.gotClientObject(_clobj);
              }
  
              public void requestFailed (int oid, ObjectAccessException cause) {
                  // aiya! we were unable to subscribe to the client object.  we're hosed!
                  log.warning("Invocation director unable to subscribe to client object",
                              "cloid", cloid, "cause", cause + "]!");
                  _client.getClientObjectFailed(cause);
              }
          });
      }
docs: Initializes the invocation director. This is called when the client establishes a connection
  with the server.
  
  @param omgr the distributed object manager via which the invocation manager will send and
  receive events.
  @param cloid the oid of the object on which invocation notifications as well as invocation
  responses will be received.
  @param client a reference to the client for whom we're doing our business.