Advertisement
Guest User

Untitled

a guest
May 27th, 2015
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. case INFO:
  2. // FIXME do not create a serverProxy like this, inject it using Guice
  3. try (SvpServerProxy serverProxy = new SvpServerProxy(message.getURL())) {
  4.  
  5. List<DeploymentSummary> list = serverProxy.getDeployments().getDeploymentSummaryList();
  6.  
  7. if (list == null) {
  8. message.setExitCode(2);
  9. throw new Exception(String.format("Cannot connect to \"%s\".", message.getURL()));
  10. }
  11.  
  12. for (DeploymentSummary summary : list) {
  13. if (!summary.getDeploymentID().isEmpty()) {
  14. message.setVirtTitleList(summary.getVirtItem().getTitle());
  15. }
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement