Package org.sblim.wbem.client

Examples of org.sblim.wbem.client.CIMClient


    CIMNameSpace nameSpace = new CIMNameSpace(url,NAMESPACE);

    // *****************************
    // 3. Create CIM Client
    // *****************************               
    _cimClient = new CIMClient(nameSpace,userPr,pwCred);

    System.out.println("Established Connection");
  }
View Full Code Here


  public void initialize(String url, String namespace, String username, String password) throws SPLException
  {
    logger.entering(sourceClass,Thread.currentThread().getName()+" "+"initialize");
   
    CIMClient a=getCIMClient(url, namespace, username, password);
    DataCollector dc = new CIMClientSideDataCollectorImpl(a);
    Actuator ac = new CIMClientSideActuatorImpl(a);
   
   
    _policyManager= new PolicyManagerImpl(dc,ac);
View Full Code Here

  }
 

 
  private CIMClient getCIMClient(String url, String namespace, String username, String password) {
    CIMClient client = null;
    try {
     
   
      // *****************************
      // 1. Create user credentials
      // *****************************
      UserPrincipal userPr = new UserPrincipal(username);
      char [] pwdCharArray = password.toCharArray();
      PasswordCredential pwCred = new PasswordCredential(pwdCharArray);     
 
      // *****************************
      // 2. Set NameSpace
      // - URL is set like: http(s)://<IP>:Port
      // - Namespace does not need to be specified in COPs if set in this constuctor
      // - There is no server authentication being done. Thus: No need for a truststore
      // *****************************     
      CIMNameSpace ns = new CIMNameSpace(url,namespace);
   
      // *****************************
      // 3. Create CIM Client
      // *****************************               
      client = new CIMClient(ns,userPr,pwCred);

     
     
      System.out.println("got new cim client");
    } catch(Exception e) {
View Full Code Here

    PasswordCredential pwCred = new PasswordCredential(
        sessionId.toCharArray());

    CIMNameSpace ns = new CIMNameSpace(
        cimAgentAddress, namespace);
    CIMClient cimClient = new CIMClient(ns, userPr, pwCred);
    CIMObjectPath rpCOP = new CIMObjectPath(
        "CIM_RegisteredProfile");

    System.out.println("Looking for children of " +
        "CIM_RegisteredProfile");

    long enumerationStart = System.currentTimeMillis();
    Enumeration rpEnm = cimClient.enumerateInstances(rpCOP);
    long enumerationStop = System.currentTimeMillis();
    System.out.println("Enumeration completed in: " +
      (enumerationStop - enumerationStart) / 1000 + " sec.\n");

    while (rpEnm.hasMoreElements())
View Full Code Here

TOP

Related Classes of org.sblim.wbem.client.CIMClient

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.