}
System.out.println("\nUsing endpoint:\n---------------\n" +
client.endpoint + "---------------\n");
WorkspaceStatusPortType statusPort =
client.initStatusPort(client.endpoint);
try {
client.setOptions((Stub)statusPort);
} catch (Exception e) {
die(e,"Problem with stub", client.isDebugMode());
}
for (Object actionObj : client.actions) {
Integer action = (Integer) actionObj;
if (action.equals(ACTION_FACTORYQUERY)) {
(new RPQuery(client, client.endpoint, System.out)).start();
}
if (action.equals(ACTION_USAGEQUERY)) {
UsedAndReservedTime_Type usedReserved = null;
try {
usedReserved =
statusPort.queryUsedAndReservedTime(new VoidType());
} catch (RemoteException e) {
die(e, "Problem with query", client.isDebugMode());
}
Duration used = usedReserved.getUsedTime();