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());
#define IFELSE_OMNIORB4(omniORB4_code, default_code)
#define OMNIEVENTS__DEBUG_REF_COUNTS__DEFN(C)
Defines debug versions of _add/remove_ref() for class C.
Servant for CosEventChannelAdmin::EventChannel objects, also inherits from omni_thread.
CORBA::ULong maxNumProxies() const
The EventQueue is a circular buffer, that contains _size-1 events.
static bool exists()
Library code may create Event Service objects without the need for persistency.
Obtains an output stream to the active persistancy logfile, and locks it for exclusive access.
void deferredRequest(CORBA::Request_ptr req, Callback *callback=NULL)
Adopts the request and then stores it in _deferredRequests.
string attrString(const string &key, const string &fallback="") const
Base class for ServantActivator classes that manage Proxy servants.
void activate(const char *name)
Creates the Proxy-type's POA, and registers this object as its ServantManager.
set< Proxy * > _servants
The set of all active Proxies in this object's _managedPoa.
PortableServer::POA_var _managedPoa
The POA owned & managed by this object.
Base class for three of the four Proxy servants.
void basicOutput(ostream &os, const char *name, CORBA::Object_ptr target=CORBA::Object::_nil(), const char *extraAttributes=NULL)
Helper method for constructing persistency output.
void eraseKey(const char *name)
Helper method for constructing persistency output.
EventQueue & _queue
Reference to queue shared with ProxyPushSuppliers.
~ProxyPullSupplierManager()
void disconnect()
Send disconnect_pull_consumer() to all connected PullConsumers.
const EventChannel_i & _channel
OMNIEVENTS__DEBUG_REF_COUNTS__DECL CosEventChannelAdmin::ProxyPullSupplier_ptr createObject()
ProxyPullSupplierManager(const EventChannel_i &channel, PortableServer::POA_ptr parentPoa, EventQueue &q)
PortableServer::Servant incarnate(const PortableServer::ObjectId &oid, PortableServer::POA_ptr poa)
Servant for ProxyPullSupplier interface.
void output(ostream &os)
Save this object's state to a stream.
ProxyPullSupplier_i(PortableServer::POA_ptr poa, EventQueue &q)
void touch()
Update the _timestamp to the current moment.
unsigned long timestamp() const
CORBA::Any * try_pull(CORBA::Boolean &has_event)
CosEventComm::PullConsumer_var _target
unsigned long _timestamp
Keep track of when this proxy was last contacted.
void disconnect_pull_supplier()
bool _connected
Can't use _target to keep track of whether this object is connected, because it is legal to connect w...
void connect_pull_consumer(CosEventComm::PullConsumer_ptr pullConsumer)
void reincarnate(const string &oid, const PersistNode &node)
Re-create a servant from information saved in the log file.
void activateObjectWithId(const char *oidStr)
Calls activate_object_with_id() to activate this servant in its POA.
void deactivateObject()
Calls deactivate_object() to deactivate this servant in its POA.