Class SimpleAgent


  • @Sample(name="simple-agent",
            description="The SimpleAgent class uses the local credential store to obtain user account and password information, for automated logon to the target host system. SimpleAgent can be used with CreateUser, to demonstrate using the CredentialStore client API. SimpleAgent accesses the local credential store to obtain a single user account to login to the specified server (--hostName is the only common-line argument). If more than one user account exists in the credential store, an error message displays. To create user accounts and store them in the local credential store, use the CredentialStoreAdmin client utility. ")
    public class SimpleAgent
    extends java.lang.Object
     SimpleAgent
    
     The SimpleAgent class uses the local credential store to obtain user account
     and password information, for automated logon to the target host system.
     SimpleAgent can be used with CreateUser, to
     demonstrate using the CredentialStore client API.
     SimpleAgent accesses the local credential store to obtain a single user
     account to login to the specified server (--hostName is the only common-line
     argument). If more than one user account exists in the credential store,
     an error message displays.
     To create user accounts and store them in the local credential store, use
     the CredentialStoreAdmin client utility.
    
     Parameters:
     hostName           [required] : The fully-qualified domain name of the server
    
     Command Line:
     run.bat com.vmware.simpleagent.SimpleAgent --hostName [myServerName]
     
    • Constructor Summary

      Constructors 
      Constructor Description
      SimpleAgent()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void connectAndLogin()  
      void setHostName​(java.lang.String hostName)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SimpleAgent

        public SimpleAgent()
    • Method Detail

      • setHostName

        @Option(name="hostname",
                description=" The fully-qualified domain name of the server")
        public void setHostName​(java.lang.String hostName)
      • connectAndLogin

        @Action
        public void connectAndLogin()
                             throws java.lang.ClassNotFoundException,
                                    java.lang.InstantiationException,
                                    java.lang.IllegalAccessException,
                                    java.io.IOException,
                                    javax.crypto.IllegalBlockSizeException,
                                    javax.crypto.BadPaddingException
        Throws:
        java.lang.ClassNotFoundException
        java.lang.InstantiationException
        java.lang.IllegalAccessException
        java.io.IOException
        javax.crypto.IllegalBlockSizeException
        javax.crypto.BadPaddingException