@Override public Messages.NodeInformationProto getLiveNode(Messages.GetLiveNodeRequestProto request) throws IOException { String name = request.getName(); NodeInformation nodeInformation = state.getNodeInformation(name); if (nodeInformation != null) { return marshall(nodeInformation); } else { throw new FileNotFoundException("Unknown host: " + name); } }
@Override public Messages.NodeInformationProto getLiveNode(Messages.GetLiveNodeRequestProto request) throws IOException { String name = request.getName(); NodeInformation nodeInformation = state.getNodeInformation(name); if (nodeInformation != null) { return marshall(nodeInformation); } else { throw new FileNotFoundException("Unknown host: " + name); } }
@GET @Path(LIVE_NODES + "/{hostname}") @Produces({APPLICATION_JSON}) public NodeInformation getLiveNode(@PathParam("hostname") String hostname) { markGet(SLIDER_SUBPATH_APPLICATION, LIVE_NODES); try { NodeInformation ni = state.getNodeInformation(hostname); if (ni != null) { return ni; } else { throw new NotFoundException("Unknown node: " + hostname); } } catch (NotFoundException e) { throw e; } catch (Exception e) { throw buildException(LIVE_COMPONENTS + "/" + hostname, e); } }
@GET @Path(LIVE_NODES + "/{hostname}") @Produces({APPLICATION_JSON}) public NodeInformation getLiveNode(@PathParam("hostname") String hostname) { markGet(SLIDER_SUBPATH_APPLICATION, LIVE_NODES); try { NodeInformation ni = state.getNodeInformation(hostname); if (ni != null) { return ni; } else { throw new NotFoundException("Unknown node: " + hostname); } } catch (NotFoundException e) { throw e; } catch (Exception e) { throw buildException(LIVE_COMPONENTS + "/" + hostname, e); } }