00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef OMNIEVENTS__PROXYMANAGER_H
00025 #define OMNIEVENTS__PROXYMANAGER_H
00026
00027 #ifdef HAVE_CONFIG_H
00028 # include "config.h"
00029 #endif
00030
00031 #include <set>
00032 #include <string>
00033
00034 #ifdef HAVE_IOSTREAM
00035 # include <iostream>
00036 #else
00037 # include <iostream.h>
00038 #endif
00039
00040 #include "Servant.h"
00041 #include "oep_types.h"
00042
00043 #include <omniORB4/CORBA.h>
00044
00045 #ifdef HAVE_STD_IOSTREAM
00046 using namespace std;
00047 #endif
00048
00049 namespace OmniEvents {
00050
00051 class Proxy;
00052
00059 class ProxyManager
00060 : public virtual POA_PortableServer::ServantActivator,
00061 public Servant
00062 {
00063 public:
00065 void etherealize(
00066 const PortableServer::ObjectId& oid,
00067 PortableServer::POA_ptr adapter,
00068 PortableServer::Servant serv,
00069 CORBA::Boolean cleanup_in_progress,
00070 CORBA::Boolean remaining_activations
00071 );
00072
00073 public:
00075 void reincarnate(const OepPrxyList& pdat);
00077 void output(ostream& os);
00078
00079 protected:
00084 ProxyManager(PortableServer::POA_ptr poa, const char* name);
00085 virtual ~ProxyManager();
00086
00088 set<Proxy*> _servants;
00093 PortableServer::POA_var _managedPoa;
00094 };
00095
00096
00102 class Proxy
00103 : public virtual PortableServer::ServantBase,
00104 public Servant
00105 {
00106 public:
00107 virtual ~Proxy();
00109 virtual void reincarnate(const OEP_prxy& prxy)=0;
00111 virtual void output(ostream &os)=0;
00112 protected:
00113 Proxy(PortableServer::POA_ptr poa);
00114
00119 bool gotException();
00120
00121 CORBA::Request_var _req;
00122 private:
00123 Proxy(const Proxy&);
00124 };
00125
00126
00127 };
00128
00129 #endif // OMNIEVENTS__PROXYMANAGER_H