コード例 #1
0
  protected void connectToServer() {
    try {
      remoteObjectStore = ERDistributedObjectStore.connectToServer();
      remoteObjectStore.distributionChannel().setDelegate(this);
    } catch (ServerConnectionException e) {
      handleNoInstanceAvailable(e);
    }

    ERXEC.setDefaultParentObjectStore(remoteObjectStore);

    // Fetch the class descriptions right away to avoid bugs and performance issues from doing it on
    // demand
    NSArray<EOClassDescription> classDescriptions =
        (NSArray<EOClassDescription>)
            remoteObjectStore.invokeStatelessRemoteMethod("clientSideRequestGetClassDescriptions");
    registerClassDescriptions(classDescriptions);
  }