Looking up a Secured Engine Using the API
The following code snippet demonstrates how to look up a secured engine with the API:
// The host name, port number, and SSL setting of the engine to look up.
Engine engine = Factory.makeInstance().lookupEngine("localhost", 7250, true);
// Log in to the engine. Without logging in, any secured methods attempted on the engine will fail with an exception.
engine.login("admin", "admin");
// …Your code here…
// Log out of the engine.
engine.logout();