Help! - I have connected to ice, can list the nodes and servers, but there is missing information

robindrewrobindrew LondonRobin DrewOrganization: Royal Bank of CanadaProject: PrivateMember

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

Comments

  • benoitbenoit Rennes, FranceBenoit FoucherOrganization: ZeroC, Inc.Project: IceAdministrators, ZeroC Staff ZeroC Staff

    See the IceGrid::Admin API reference for all the available methods: https://doc.zeroc.com/display/Ice37/IceGrid-Admin

    The isServerEnabled method to get the server enabled/disabled status and the getApplicationInfo method to get the server template are the methods you're looking for.

    Cheers,
    Benoit.

Sign In or Register to comment.