00001 #ifndef _IT_BUS_SERVICES_PEER_MONITOR_H_
00002 #define _IT_BUS_SERVICES_PEER_MONITOR_H_
00003
00004
00005
00006
00007 #ifndef IT_PMS_SVR_API
00008 #ifdef IT_PMS_SVR_API_EXPORT
00009 #define IT_PMS_SVR_API IT_DECLSPEC_EXPORT
00010 #else
00011 #define IT_PMS_SVR_API IT_DECLSPEC_IMPORT
00012 #endif
00013 #endif
00014
00015 #include <orbix_pdk/orb_plugin.hh>
00016 #include <it_bus/types.h>
00017 #include <it_bus/wsaddressing_xsdTypes.h>
00018
00019 namespace IT_Bus_Services
00020 {
00021 struct PeerMonitorId
00022 {
00023 IT_Bus::String base_id;
00024 IT_Bus::String element_id;
00025 };
00026
00027 class IT_PMS_SVR_API PingReceiverCallback
00028 {
00029 public:
00030 virtual ~PingReceiverCallback();
00031
00032 virtual void
00033 ping_failure(
00034 const PeerMonitorId& id
00035 ) = 0;
00036 };
00037
00038 class IT_PMS_SVR_API PeerMonitor : public CORBA::LocalObject
00039 {
00040 public:
00041
00042 virtual PeerMonitorId
00043 monitor(
00044 const WS_Addressing::EndpointReferenceType& peer,
00045 PingReceiverCallback* cb,
00046 IT_Bus::ULong timeout_msecs
00047 ) = 0;
00048
00049 virtual void
00050 stop_monitor(
00051 const IT_Bus::String& base_id,
00052 PingReceiverCallback* callback,
00053 bool deregister_interest = true
00054 ) = 0;
00055
00056 virtual const WS_Addressing::EndpointReferenceType&
00057 get_epr_reference() = 0;
00058
00059 virtual bool
00060 is_local_id(
00061 const PeerMonitorId& id
00062 ) = 0;
00063 };
00064 }
00065
00066 #endif