|
static Nice::ObjectPrxMultiDict | resolveMultiObjectList (const Ice::CommunicatorPtr &_communicator, double _time=0.7) |
|
template<typename CALLBACK > |
static void | resolveMultiObjectListToCallback (const Ice::CommunicatorPtr &_communicator, CALLBACK *_cb, double _time=0.7) |
|
static Nice::ObjectPrxDict | resolveObjectList (const Ice::CommunicatorPtr &_communicator, double _time=0.7) |
|
static Nice::ObjectPrxDict | resolveObjectListOfType (const Ice::CommunicatorPtr &_communicator, const std::string &_type, double _time=0.7) |
|
static Ice::ObjectPrx | resolveObjectPrx (const Ice::CommunicatorPtr &_communicator, const std::string &_name, double _time=0.7) |
|
template<class S > |
static S::ProxyType | resolveObject (const Ice::CommunicatorPtr &_communicator, const std::string &_name, double _time=0.7) |
|
static Nice::ObjectPrxMultiDict | resolveMultiObjectList (const Ice::CommunicatorPtr &_communicator, double _time=0.7) |
|
template<typename CALLBACK > |
static void | resolveMultiObjectListToCallback (const Ice::CommunicatorPtr &_communicator, CALLBACK *_cb, double _time=0.7) |
|
static Nice::ObjectPrxDict | resolveObjectList (const Ice::CommunicatorPtr &_communicator, double _time=0.7) |
|
static Nice::ObjectPrxDict | resolveObjectListOfType (const Ice::CommunicatorPtr &_communicator, const std::string &_type, double _time=0.7) |
|
static Ice::ObjectPrx | resolveObjectPrx (const Ice::CommunicatorPtr &_communicator, const std::string &_name, double _time=0.7) |
|
template<class S > |
static S::ProxyType | resolveObject (const Ice::CommunicatorPtr &_communicator, const std::string &_name, double _time=0.7) |
|
Multicasting for Object References
- Author
- Florian Briegel
- Version
- 11.02.04
- Date
- 2012-08-10 11:04:58 AM Usage:
Simple example of the serverside usage
Ice::CommunicatorPtr communicator = Ice::initialize ( argc, argv );;
// Here we put all the proxy we want to find by multicast.
Nice::ObjectPrxDict & objects;
Nice::ObjectFinderPtr finder = new ObjectFinder(communicator, objects);
Ice::ObjectAdapterPtr adapter =
communicator()->createObjectAdapterWithEndpoints("HelloAdapter", "tcp -p 10000");
adapter->activate();
Ice::ObjectPrx prx =
adapter->add(new HelloI(), communicator->stringToIdentity("hello"));
// Add the hello proxy ( Maybe we should use a list instead of map ?)
objects["hello"] = prx;
communicator->waitForShutdown ();
With this Class you can multicast (UDP) for a named object Reference or a list of Object References.
The following code snippet illustrates finding a ObjectReference of type Hello and with the name Hello
Ice::CommunicatorPtr communicator = Ice::initialize ( argc, argv );;
Nice::MyObjectServicePrx service =
Nice::ObjectFinder::resolveObject<Hello>(communicator, "Hello");
if(service == 0) E_LOG("No service found!");
Next example multicasts for all available Objectreferences in the net.
Ice::CommunicatorPtr communicator = Ice::initialize ( argc, argv );;
ObjectProxyDict objects = ObjectFinder::resolveObjectList(communicator);
U9_LOG("We found #" << objects.size() << " object refs.);
for (ObjectProxyDict::iterator it = objects.begin(); it != objects.end(); ++it)
{
U9_LOG(it->first);
}
- Todo:
- How can I close a Ice::Adapter?
- Author
- Florian Briegel
- Version
- 11.02.04
- Date
- 2012-08-10 11:04:58 AM Usage:
Simple example of the serverside usage
Ice::CommunicatorPtr communicator = Ice::initialize ( argc, argv );;
// Here we put all the proxy we want to find by multicast.
Nice::ObjectPrxDict & objects;
Nice::ObjectFinderPtr finder = new ObjectFinder(communicator, objects);
Ice::ObjectAdapterPtr adapter =
communicator()->createObjectAdapterWithEndpoints("HelloAdapter", "tcp -p 10000");
adapter->activate();
Ice::ObjectPrx prx =
adapter->add(new HelloI(), communicator->stringToIdentity("hello"));
// Add the hello proxy ( Maybe we should use a list instead of map ?)
objects["hello"] = prx;
communicator->waitForShutdown ();
With this Class you can multicast (UDP) for a named object Reference or a list of Object References.
The following code snippet illustrates finding a ObjectReference of type Hello and with the name Hello
Ice::CommunicatorPtr communicator = Ice::initialize ( argc, argv );;
Nice::MyObjectServicePrx service =
Nice::ObjectFinder::resolveObject<Hello>(communicator, "Hello");
if(service == 0) E_LOG("No service found!");
Next example multicasts for all available Objectreferences in the net.
Ice::CommunicatorPtr communicator = Ice::initialize ( argc, argv );;
ObjectProxyDict objects = ObjectFinder::resolveObjectList(communicator);
U9_LOG("We found #" << objects.size() << " object refs.);
for (ObjectProxyDict::iterator it = objects.begin(); it != objects.end(); ++it)
{
U9_LOG(it->first);
}
- Todo:
- How can I close a Ice::Adapter?