PINStatusCommand implements Callable<WFSPINSTATUS> { @Override public WFSPINSTATUS call() throws XfsException { final String method = "call()"; final XfsInfoCommand infoCommand = new XfsInfoCommand(pinService, PINInfoCommand.STATUS); WFSResult wfsResult = null; try { wfsResult = infoCommand.call(); final WFSPINSTATUS pinStatus = new WFSPINSTATUS( pinService.getXfsVersion(), wfsResult.getResults()); if (LOG.isInfoEnabled()) { LOG.info(method, "pinStatus=" + pinStatus); } return new WFSPINSTATUS(pinService.getXfsVersion(), pinStatus); } finally { if (wfsResult != null) { XfsServiceManager.getInstance().free(wfsResult); } } } PINStatusCommand(final PINService pinService); @Override WFSPINSTATUS call();  }
@Test public void execute() throws Exception { for (final PINService pinService : serviceManager.getServices(PINService.class)) { final WFSPINSTATUS pinStatus = new PINStatusCommand(pinService).call(); System.out.println(pinStatus); } }