Go to the documentation of this file.
38 const PortableServer::ObjectId& oid,
39 PortableServer::POA_ptr poa
53 DB(5,
"Evicting oldest ProxyPullSupplier to make space for a new one")
64 PortableServer::POA_ptr parentPoa,
76 DB(20,
"~ProxyPullSupplierManager()")
81 CosEventChannelAdmin::ProxyPullSupplier_ptr
84 return createNarrowedReference<CosEventChannelAdmin::ProxyPullSupplier>(
86 CosEventChannelAdmin::_tc_ProxyPullSupplier->id()
97 CosEventChannelAdmin::ProxyPullSupplier_var ppsv =pps->_this();
111 CosEventComm::PullConsumer_ptr pullConsumer
115 throw CosEventChannelAdmin::AlreadyConnected();
118 if(!CORBA::is_nil(pullConsumer))
119 _target=CosEventComm::PullConsumer::_duplicate(pullConsumer);
130 DB(5,
"ProxyPullSupplier_i::disconnect_pull_supplier()");
132 eraseKey(
"ConsumerAdmin/ProxyPullSupplier");
136 throw CORBA::OBJECT_NOT_EXIST(
141 else if(!CORBA::is_nil(
_target))
143 CORBA::Request_var req=
_target->_request(
"disconnect_pull_consumer");
144 _target=CosEventComm::PullConsumer::_nil();
145 req->send_deferred();
153 throw CosEventComm::Disconnected();
158 throw CORBA::TRANSIENT(
167 throw CosEventComm::Disconnected();
177 return new CORBA::Any();
184 PortableServer::POA_ptr poa,
189 _target(CosEventComm::PullConsumer::_nil()),
198 DB(20,
"~ProxyPullSupplier_i()")
206 CosEventComm::PullConsumer_var pullConsumer =
207 string_to_<CosEventComm::PullConsumer>(node.
attrString(
"IOR").c_str());
Servant for CosEventChannelAdmin::EventChannel objects, also inherits from omni_thread.
set< Proxy * > _servants
The set of all active Proxies in this object's _managedPoa.
ProxyPullSupplier_i(PortableServer::POA_ptr poa, EventQueue &q)
void deactivateObject()
Calls deactivate_object() to deactivate this servant in its POA.
CORBA::Any * try_pull(CORBA::Boolean &has_event)
void reincarnate(const string &oid, const PersistNode &node)
Re-create a servant from information saved in the log file.
PortableServer::Servant incarnate(const PortableServer::ObjectId &oid, PortableServer::POA_ptr poa)
#define OMNIEVENTS__DEBUG_REF_COUNTS__DEFN(C)
Defines debug versions of _add/remove_ref() for class C.
Base class for ServantActivator classes that manage Proxy servants.
OMNIEVENTS__DEBUG_REF_COUNTS__DECL CosEventChannelAdmin::ProxyPullSupplier_ptr createObject()
void output(ostream &os)
Save this object's state to a stream.
EventQueue & _queue
Reference to queue shared with ProxyPushSuppliers.
void basicOutput(ostream &os, const char *name, CORBA::Object_ptr target=CORBA::Object::_nil(), const char *extraAttributes=NULL)
Helper method for constructing persistency output.
const EventChannel_i & _channel
void activate(const char *name)
Creates the Proxy-type's POA, and registers this object as its ServantManager.
void activateObjectWithId(const char *oidStr)
Calls activate_object_with_id() to activate this servant in its POA.
CosEventComm::PullConsumer_var _target
bool _connected
Can't use _target to keep track of whether this object is connected, because it is legal to connect w...
unsigned long timestamp() const
Obtains an output stream to the active persistancy logfile, and locks it for exclusive access.
Base class for three of the four Proxy servants.
static bool exists()
Library code may create Event Service objects without the need for persistency.
void eraseKey(const char *name)
Helper method for constructing persistency output.
PortableServer::POA_var _managedPoa
The POA owned & managed by this object.
#define IFELSE_OMNIORB4(omniORB4_code, default_code)
void connect_pull_consumer(CosEventComm::PullConsumer_ptr pullConsumer)
void disconnect()
Send disconnect_pull_consumer() to all connected PullConsumers.
ProxyPullSupplierManager(const EventChannel_i &channel, PortableServer::POA_ptr parentPoa, EventQueue &q)
unsigned long _timestamp
Keep track of when this proxy was last contacted.
Servant for ProxyPullSupplier interface.
string attrString(const string &key, const string &fallback="") const
void disconnect_pull_supplier()
void touch()
Update the _timestamp to the current moment.
void deferredRequest(CORBA::Request_ptr req, Callback *callback=NULL)
Adopts the request and then stores it in _deferredRequests.
CORBA::ULong maxNumProxies() const
~ProxyPullSupplierManager()
The EventQueue is a circular buffer, that contains _size-1 events.