home *** CD-ROM | disk | FTP | other *** search
/ Java 1.2 How-To / JavaHowTo.iso / 3rdParty / jbuilder / TRIAL / JBUILDER / JVISBRKR.Z / locate.idl < prev    next >
Encoding:
Text File  |  1998-05-08  |  2.9 KB  |  128 lines

  1. #ifdef JAVA
  2.  
  3. module org { module omg {
  4. #pragma prefix "omg.org"
  5. module CORBA {
  6.     typedef sequence<octet> OctetSequence;
  7. };
  8. };};
  9.     
  10. #else /* C++ */
  11. #  include <iiop.idl>
  12. #endif
  13.  
  14. #ifdef JAVA
  15. module com {
  16. module visigenic {
  17. module vbroker {
  18. #endif
  19.  
  20. #pragma prefix "visigenic.com"
  21.  
  22. #ifdef JAVA
  23. //otherwise these are defined in iiop.idl
  24. module GIOP {
  25.     struct Version { octet major, minor; };
  26. };
  27.  
  28. module IIOP {
  29.   struct ProfileBody {
  30.     GIOP::Version            iiop_version;
  31.     string                host;
  32.     unsigned short            port;    
  33.     ::org::omg::CORBA::OctetSequence    object_key;
  34.   };
  35. };
  36. #endif
  37.  
  38. module ObjLocation {
  39.  
  40.   struct Desc {
  41.     Object ref;
  42.     IIOP::ProfileBody iiop_locator;
  43.     string repository_id;
  44.     string instance_name;
  45.     boolean activable;
  46.     string agent_hostname;
  47.   };
  48.  
  49.   struct TriggerDesc {
  50.     string repository_id;
  51.     string instance_name;
  52.     string host_name;
  53.   };
  54.  
  55.  
  56.   typedef sequence<Object> ObjSeq;
  57.   typedef sequence<Desc>   DescSeq;
  58.   typedef sequence<string> RepositoryIdSeq;
  59.   typedef sequence<string> HostnameSeq;
  60.  
  61.   // AGENT_ERROR is thrown in case of unsuccessful communications
  62.   // with the OSAgent (other than the case where no agent is 
  63.   // available)
  64.   enum FailReason { NO_AGENT_AVAILABLE
  65.             , INVALID_REPOSITORY_ID
  66.             , INVALID_OBJECT_NAME
  67.             , NO_SUCH_TRIGGER
  68.                     , AGENT_ERROR};
  69.             
  70.     
  71.  
  72.   exception Fail {
  73.     FailReason reason;
  74.   };
  75.  
  76.   interface TriggerHandler {
  77.     void impl_is_ready(in Desc desc);
  78.     void impl_is_down(in Desc desc);
  79.   };
  80.  
  81.   interface Agent {
  82.  
  83.     // Returns a sequence of hostnames on which OSAgents reside
  84.     HostnameSeq all_agent_locations() raises (Fail);
  85.  
  86.     // Returns a sequence of repository ids which are registered
  87.     // with any OSAgent
  88.     RepositoryIdSeq all_repository_ids() raises (Fail);
  89.  
  90.     // Returns a sequence of Objects which satisfy the given 
  91.     // repository_id
  92.     ObjSeq all_instances (in string repository_id)
  93.       raises (Fail);
  94.  
  95.     // Returns a sequence of Objects which satisfy the given 
  96.     // repository_id and instance name
  97.     ObjSeq all_replica (in string repository_id, in string instance_name)
  98.       raises (Fail);
  99.  
  100.     // Returns full description information for all objects which
  101.     // implement the given repository_id
  102.     DescSeq all_instances_descs (in string repository_id)
  103.       raises (Fail);
  104.  
  105.     // Returns full description information for all objects which
  106.     // implement the given repository id and have the given
  107.     // instance name
  108.     DescSeq all_replica_descs (in string repository_id,
  109.                    in string instance_name)
  110.       raises (Fail);
  111.  
  112.     void reg_trigger(in TriggerDesc desc, in TriggerHandler handler)
  113.       raises (Fail);
  114.  
  115.     void unreg_trigger(in TriggerDesc desc, in TriggerHandler handler) 
  116.       raises (Fail);
  117.  
  118.   };
  119.  
  120.  
  121. };
  122.  
  123. #ifdef JAVA
  124. }; /* module vbroker */
  125. }; /* module visigenic */
  126. }; /* module com */
  127. #endif
  128.