AgentContext and ServerContext are lightweight, immutable Java objects.
Creating either of these objects does not immediately establish a connection to either Sybase Control Center or the Unwired Server.
AgentContext agentContext = new AgentContext(); agentContext = new AgentContext("<host name>", 9999, "supAdmin", "s3pAdmin");
Every ServerContext instance has an AgentContext instance. When you instantiate ServerContext, you can pass an instance of AgentContext to the constructor. If you do not specify an AgentContext, the constructor automatically creates an AgentContext with the same host, user name, and password values as those defined in the ServerContext.
ServerContext serverContext = new ServerContext(); serverContext = new ServerContext("<host name>", 2000, "supAdmin", "s3pAdmin", false);