//CORBA facilities: Mobile Agent Facility Submission 88 module CfMAF { /******************************************************************/ /* Data Types */ /******************************************************************/ typedef sequence OctetString; typedef sequence OctetStrings; typedef OctetString Authority; typedef OctetString Identity; typedef short LanguageID; typedef short AgentSystemType; typedef short Authenticator; typedef short SerializationID; typedef sequence SerializationIDList; typedef any Property; typedef sequence PropertyList; struct Name { Authority authority; Identity identity; AgentSystemType agent_system_type; }; typedef sequence NameList; struct AuthInfo { boolean is_authenticated; Authenticator authenticator; }; struct LanguageMap { LanguageID language_id; SerializationIDList serializations; }; typedef sequence LanguageMapList; struct AgentSystemInfo { Name agent_system_name; AgentSystemType agent_system_type; LanguageMapList language_maps; string agent_system_description; short major_version; short minor_version; PropertyList properties; }; struct AgentProfile{ LanguageID language_id; AgentSystemType agent_system_type; string agent_system_description; short major_version; short minor_version; SerializationID serialization; PropertyList properties; }; struct ClassName{ string name; OctetString discriminator; }; typedef sequence ClassNameList; typedef sequence Arguments; typedef string Location; typedef sequence Locations; enum AgentStatus { CfMAFRunning, CfMAFSuspended, CfMAFTerminated }; //CORBA Facilities: Mobile Agent System Interoperability Facilities Submission /******************************************************************/ /* Exceptions */ /******************************************************************/ exception AgentNotFound {}; exception AgentIsRunning {}; exception AgentIsSuspended {}; exception ArgumentInvalid {}; exception ClassUnknown {}; exception DeserializationFailed {}; exception EntryNotFound {}; exception FinderNotFound {}; exception MAFExtendedException {}; exception NameInvalid {}; exception ResumeFailed {}; exception SuspendFailed {}; exception TerminateFailed {}; /******************************************************************/ /* Interface Definitions */ /******************************************************************/ interface MAFFinder { void register_agent ( in Name agent_name, in Location agent_location, in AgentProfile agent_profile) raises (NameInvalid); void register_agent_system ( in Name agent_system_name, in Location agent_system_location, in AgentSystemInfo agent_system_info) raises (NameInvalid); void register_place ( in string place_name, in Location place_location) raises (NameInvalid); Locations lookup_agent ( in Name agent_name, in AgentProfile agent_profile) raises (EntryNotFound); Locations lookup_agent_system ( in Name agent_system_name, in AgentSystemInfo agent_system_info) raises (EntryNotFound); Locations lookup_place (in string place_name) raises (EntryNotFound); void unregister_agent (in Name agent_name) raises (EntryNotFound); void unregister_agent_system (in Name agent_system_name) raises (EntryNotFound); void unregister_place (in string place_name) raises (EntryNotFound); }; interface MAFAgentSystem { Name create_agent (in Name agent_name, in AgentProfile agent_profile, in OctetString agent, in string place_name, in Arguments arguments, in ClassNameList class_names, in string code_base, in MAFAgentSystem class_provider) raises (ClassUnknown, ArgumentInvalid, DeserializationFailed, MAFExtendedException); OctetStrings fetch_class(in ClassNameList class_name_list, in string code_base, in AgentProfile agent_profile) raises (ClassUnknown, MAFExtendedException); Location find_nearby_agent_system_of_profile (in AgentProfile profile) raises (EntryNotFound); AgentStatus get_agent_status(in Name agent_name) raises(AgentNotFound); AgentSystemInfo get_agent_system_info(); AuthInfo get_authinfo(in Name agent_name) raises (AgentNotFound); MAFFinder get_MAFFinder() raises (FinderNotFound); NameList list_all_agents(); NameList list_all_agents_of_authority(in Authority authority); Locations list_all_places(); void receive_agent(in Name agent_name, in AgentProfile agent_profile, in OctetString agent, in string place_name, in ClassNameList class_names, in string code_base, in MAFAgentSystem agent_sender) raises (ClassUnknown, ArgumentInvalid, DeserializationFailed, MAFExtendedException); void resume_agent(in Name agent_name) raises (AgentNotFound, ResumeFailed, AgentIsRunning); void suspend_agent(in Name agent_name) raises (AgentNotFound, SuspendFailed, AgentIsSuspended); void terminate_agent(in Name agent_name) raises (AgentNotFound, TerminateFailed); }; };