2

使用 Java 作为编程语言,我有一个关于如何将对象从 Corba 客户端发送到 Corba 服务器的问题,注意我正在使用 POA 和以下 idl 文件:-

// BackupServer.idl

#ifndef BackupServer_idl
#define BackupServer_idl

interface BackupDaemon;
#include "BackupExceptions.idl"
typedef sequence<BackupDaemon> BackupDaemonList;

interface BackupDaemon {
   attribute string backupDaemonUser;
   attribute string backupDaemonIP;
   attribute string backupDaemonHostName;
   attribute string backupDaemonBackupType;
   attribute string backupDaemonType;
   attribute string backupDaemonTime;
   attribute string backupDaemonPath;
   attribute boolean backupDaemonScheduled;
   attribute long backupDaemonPort;
   attribute string backupDaemonMacAddress;
   typedef sequence<string> BackupPathesStrings;
   boolean startBackup(
      in BackupPathesStrings backupPathes,
      in string backupDaemonMacAddress );
   void deleteBackup(
      in string backupPathes,
      in string backupDaemonMacAddress ) raises (BackupPathNotFoundException);
};

interface BackupServer {
   boolean registerBackupDaemon( in BackupDaemon bd )
      raises (InvalidBackupDaemonException);
   boolean unRegisterBackupDaemon(in string backupDaemonMacAddress)
      raises (InvalidBackupDaemonException);
   BackupDaemonList getBackupDeamons();
};

提前致谢

4

1 回答 1

2

使用 CORBA 在线路上发送的唯一“真实”对象是ValueType ,否则可以交换“引用”,并且可以交换更简单的结构化原始数据,例如“struct”和“union”

将 CORBA 服务器从一个位置迁移到另一个位置并非易事,也不是直接可行的,但可以通过复杂的部署来实现。

于 2012-12-02T17:44:30.420 回答