Archived
This forum has been archived. Please start a new discussion on GitHub.
Help! - I have connected to ice, can list the nodes and servers, but there is missing information
robindrew
London
in Help Center
I have an AminPrx object and can query it successfully, but notice that the following information is missing:
- Is the server enabled/disabled?
- How do I access/view/download the template used for the server?
A sample of the code I have:
// Set the locator Object localObject1 = IceGrid.LocatorPrxHelper.checkedCast(communicator.stringToProxy(identity.toString())); RegistryPrx registry = ((IceGrid.LocatorPrx) localObject1).getLocalRegistry(); communicator.setDefaultLocator((Ice.LocatorPrx) localObject1); Properties localObject2 = communicator.getProperties(); localObject2.setProperty("CollocInternal.AdapterId", java.util.UUID.randomUUID().toString()); ObjectAdapter localObjectAdapter = communicator.createObjectAdapter("CollocInternal"); localObjectAdapter.setLocator(null); // ObjectPrx localObjectPrx = localObjectAdapter.addWithUUID(new ReuseConnectionRouter((ObjectPrx) localObject1)); // communicator.setDefaultRouter(Ice.RouterPrxHelper.uncheckedCast(localObjectPrx)); registry = RegistryPrxHelper.uncheckedCast(registry.ice_router(communicator.getDefaultRouter())); AdminSessionPrx session = registry.createAdminSession(username, password); AdminPrx admin = session.getAdmin();
Many thanks,
Robin
0
Comments
-
See the
IceGrid::Admin
API reference for all the available methods: https://doc.zeroc.com/display/Ice37/IceGrid-AdminThe
isServerEnabled
method to get the server enabled/disabled status and thegetApplicationInfo
method to get the server template are the methods you're looking for.Cheers,
Benoit.0