Example of a list of objects in an HSM partition.
- See Note on examples.
package doxy.examples;
import com.dinamonetworks.Dinamo;
import br.com.trueaccess.TacException;
public class ListObjects {
static String ipHSM = "127.0.0.1";
static String usr_admin = "master";
static String senha_admin = "12345678";
public static void main(String[] args) throws TacException {
Dinamo api = new Dinamo();
System.out.println("--> Login user");
api.openSession(ipHSM, usr_admin, senha_admin);
System.out.println("--> List objects");
String[] objList = api.listObjects();
if (objList == null) {
System.out.println("No objects found");
return;
}
for (String user : objList) {
System.out.println("Obj==>" + user);
}
api.closeSession();
System.out.println("The process ended sucessfully");
}
}