ProxyPushSupplier.h

Go to the documentation of this file.
00001 //                            Package   : omniEvents
00002 // ProxyPushSupplier.h        Created   : 2003/12/04
00003 //                            Author    : Alex Tingle
00004 //
00005 //    Copyright (C) 2003 Alex Tingle.
00006 //
00007 //    This file is part of the omniEvents application.
00008 //
00009 //    omniEvents is free software; you can redistribute it and/or
00010 //    modify it under the terms of the GNU Lesser General Public
00011 //    License as published by the Free Software Foundation; either
00012 //    version 2.1 of the License, or (at your option) any later version.
00013 //
00014 //    omniEvents is distributed in the hope that it will be useful,
00015 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 //    ME not activate until we know that we have read a valid target.
00360     activateObjectWithId(oid.c_str());
00361     _target=pushConsumer._retn();
00362     _targetIsProxy=bool(node.attrLong("proxy"));
00363 
00364     // If pushConsumer is a proxy, then try to reconnect.
00365     if(_targetIsProxy)
00366     {
00367       DB(15,"Attempting to reconnect ProxyPushSupplier: "<<oid.c_str())
00368       // This will only work if the proxy is implemented in the same way as
00369       // omniEvents, so connect_() automatically creates a proxy.
00370       ProxyPushConsumer_var proxyCons =
00371         string_to_<ProxyPushConsumer>(ior.c_str());
00372       CosEventComm::PushSupplier_var thisSupp =_this();
00373       proxyCons->connect_push_supplier(thisSupp);
00374       DB(7,"Reconnected ProxyPushSupplier: "<<oid.c_str())
00375     }
00376   }
00377   catch(CosEventChannelAdmin::AlreadyConnected&){ // connect_push_supplier()
00378     // The supplier doesn't need to be reconnected.
00379     DB(7,"Remote ProxyPushConsumer already connected: "<<oid.c_str())
00380   }
00381   catch(CosEventChannelAdmin::TypeError&){ // connect_push_supplier()
00382     // Don't know what to make of this...
00383     DB(2,"Remote ProxyPushConsumer threw TypeError: "<<oid.c_str())
00384   }
00385   catch(CORBA::OBJECT_NOT_EXIST&) {} // object 'pushConsumer' not responding.
00386   catch(CORBA::TRANSIENT&       ) {} // object 'pushConsumer' not responding.
00387   catch(CORBA::COMM_FAILURE&    ) {} // object 'pushConsumer' not responding.
00388 }
00389 
00390 
00391 void ProxyPushSupplier_i::output(ostream &os)
00392 {
00393   basicOutput(
00394     os,"ConsumerAdmin/ProxyPushSupplier",
00395     _target.in(),
00396     _targetIsProxy? " proxy=1": NULL
00397   );
00398 }
00399 
00400 
00401 }; // end namespace OmniEvents

Generated on Mon Jan 2 17:11:10 2006 for OmniEvents by  doxygen 1.4.6
./usr/share/doc/libomnievents-dev/doxygen/a00189.html0000644000000000000000000003755110356347456021240 0ustar rootroot OmniEvents: ProxyPushSupplier.h Source File

ProxyPushSupplier.h

Go to the documentation of this file.
00001 //                            Package   : omniEvents
00002 // ProxyPushSupplier.h        Created   : 2003/12/04
00003 //                            Author    : Alex Tingle
00004 //
00005 //    Copyright (C) 2003 Alex Tingle.
00006 //
00007 //    This file is part of the omniEvents application.
00008 //
00009 //    omniEvents is free software; you can redistribute it and/or
00010 //    modify it under the terms of the GNU Lesser General Public
00011 //    License as published by the Free Software Foundation; either
00012 //    version 2.1 of the License, or (at your option) any later version.
00013 //
00014 //    omniEvents is distributed in the hope that it will be useful,
00015 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 //    ME not activate until we know that we have read a valid target.
00360     activateObjectWithId(oid.c_str());
00361     _target=pushConsumer._retn();
00362     _targetIsProxy=bool(node.attrLong("proxy"));
00363 
00364     // If pushConsumer is a proxy, then try to reconnect.
00365     if(_targetIsProxy)
00366     {
00367       DB(15,"Attempting to reconnect ProxyPushSupplier: "<<oid.c_str())
00368       // This will only work if the proxy is implemented in the same way as
00369       // omniEvents, so connect_() automatically creates a proxy.
00370       ProxyPushConsumer_var proxyCons =
00371         string_to_<ProxyPushConsumer>(ior.c_str());
00372       CosEventComm::PushSupplier_var thisSupp =_this();
00373       proxyCons->connect_push_supplier(thisSupp);
00374       DB(7,"Reconnected ProxyPushSupplier: "<<oid.c_str())
00375     }
00376   }
00377   catch(CosEventChannelAdmin::AlreadyConnected&){ // connect_push_supplier()
00378     // The supplier doesn't need to be reconnected.
00379     DB(7,"Remote ProxyPushConsumer already connected: "<<oid.c_str())
00380   }
00381   catch(CosEventChannelAdmin::TypeError&){ // connect_push_supplier()
00382     // Don't know what to make of this...
00383     DB(2,"Remote ProxyPushConsumer threw TypeError: "<<oid.c_str())
00384   }
00385   catch(CORBA::OBJECT_NOT_EXIST&) {} // object 'pushConsumer' not responding.
00386   catch(CORBA::TRANSIENT&       ) {} // object 'pushConsumer' not responding.
00387   catch(CORBA::COMM_FAILURE&    ) {} // object 'pushConsumer' not responding.
00388 }
00389 
00390 
00391 void ProxyPushSupplier_i::output(ostream &os)
00392 {
00393   basicOutput(
00394     os,"ConsumerAdmin/ProxyPushSupplier",
00395     _target.in(),
00396     _targetIsProxy? " proxy=1": NULL
00397   );
00398 }
00399 
00400 
00401 }; // end namespace OmniEvents

Generated on Mon Jan 2 17:11:10 2006 for OmniEvents by  doxygen 1.4.6
./usr/share/doc/libomnievents-dev/doxygen/a00189.html0000644000000000000000000003755110356347456021240 0ustar rootroot