code: public void setReturnSessionOrObject(PrintWriter out, Object objReturn)
      {
          String strID = null;
          String strSessionClass = null;
          if (objReturn instanceof RemoteTable)
          {
              strSessionClass = REMOTE_TABLE;
              strID = this.add(new TableHolder(this, (RemoteTable)objReturn));
          }
          else if (objReturn instanceof RemoteSession)
          {
              strSessionClass = REMOTE_SESSION;
              strID = this.add(new SessionHolder(this, (RemoteSession)objReturn));
          }
          else if (objReturn instanceof RemoteBaseSession)
          {
              strSessionClass = REMOTE_BASE_SESSION;
              strID = this.add(new BaseSessionHolder(this, (RemoteBaseSession)objReturn));
          }
          if (strID != null)
              this.setReturnString(out, strSessionClass + CLASS_SEPARATOR + strID);
          else
              this.setReturnObject(out, objReturn);
      }
docs: If this is a session, convert to a proxy session and return, if object, convert and return.
  @param out The return output stream.
  @param strReturn The string to return.