Developing Client Contexts, Objects, and Operations

Once you have an instance of ServerContext, you can create other contexts from it.

  1. Create required client artifacts.
    • Create the context objects you require. The following diagram illustrates the subclasses of AdminContext and their logical hierarchy.
      Client Contexts

      The following code fragment creates multiple contexts for cluster, security, domain, package, mobile business objects, and operations:

      ClusterContext clusterContext = serverContext.getClusterContext("<cluster name>");
      SecurityContext securityContext = clusterContext.getSecurityContext("<security configuration name>");
      DomainContext domainContext = clusterContext.getDomainContext("<domain name>");	
      PackageContext packageContext = domainContext.getPackageContext("<package name>");
      MBOContext mboContext = packageContext.getMBOContext("<MBO name>");
      OperationContext operationContext = mboContext.getOperationContext("<operation name>");
      
    • Call methods of SUPObjectFactory to create the administration interface required. For example, to create an object of SUPServer, pass an instance of ServerContext to SUPObjectFactory by calling:
      SUPObjectFactory.getSUPServer(serverContext);
  2. Once the administration session ends, clean the resources held by the API by calling SUPObjectFactory.shutdown(). This method is provided only to help your administration application exit cleanly, and is not designed to be called after each administration operation.
    For example:
    SUPObjectFactory.shutdown();
  3. Build the client application.