@GET @Produces("application/xml") public Response get(@Context UriInfo uriInfo, @Context HttpServletRequest requestContext) { ActiveMQRestLogger.LOGGER.debug("Handling GET request for \"" + destination + "\" from " + requestContext.getRemoteAddr() + ":" + requestContext.getRemotePort()); StringBuilder msg = new StringBuilder(); msg.append("<queue>").append("<name>").append(destination).append("</name>").append("<atom:link rel=\"create\" href=\"").append(createSenderLink(uriInfo)).append("\"/>").append("<atom:link rel=\"create-with-id\" href=\"").append(createSenderWithIdLink(uriInfo)).append("\"/>").append("<atom:link rel=\"pull-consumers\" href=\"").append(createConsumersLink(uriInfo)).append("\"/>").append("<atom:link rel=\"push-consumers\" href=\"").append(createPushConsumersLink(uriInfo)).append("\"/>") .append("</queue>"); Response.ResponseBuilder builder = Response.ok(msg.toString()); setSenderLink(builder, uriInfo); setSenderWithIdLink(builder, uriInfo); setConsumersLink(builder, uriInfo); setPushConsumersLink(builder, uriInfo); return builder.build(); }
@GET @Produces("application/xml") public Response get(@Context UriInfo uriInfo, @Context HttpServletRequest requestContext) { ActiveMQRestLogger.LOGGER.debug("Handling GET request for \"" + destination + "\" from " + requestContext.getRemoteAddr() + ":" + requestContext.getRemotePort()); StringBuilder msg = new StringBuilder(); msg.append("<queue>").append("<name>").append(destination).append("</name>").append("<atom:link rel=\"create\" href=\"").append(createSenderLink(uriInfo)).append("\"/>").append("<atom:link rel=\"create-with-id\" href=\"").append(createSenderWithIdLink(uriInfo)).append("\"/>").append("<atom:link rel=\"pull-consumers\" href=\"").append(createConsumersLink(uriInfo)).append("\"/>").append("<atom:link rel=\"push-consumers\" href=\"").append(createPushConsumersLink(uriInfo)).append("\"/>") .append("</queue>"); Response.ResponseBuilder builder = Response.ok(msg.toString()); setSenderLink(builder, uriInfo); setSenderWithIdLink(builder, uriInfo); setConsumersLink(builder, uriInfo); setPushConsumersLink(builder, uriInfo); return builder.build(); }
@HEAD @Produces("application/xml") public Response head(@Context UriInfo uriInfo) { ActiveMQRestLogger.LOGGER.debug("Handling HEAD request for \"" + uriInfo.getRequestUri() + "\""); Response.ResponseBuilder builder = Response.ok(); setSenderLink(builder, uriInfo); setSenderWithIdLink(builder, uriInfo); setConsumersLink(builder, uriInfo); setPushConsumersLink(builder, uriInfo); return builder.build(); }
@HEAD @Produces("application/xml") public Response head(@Context UriInfo uriInfo) { ActiveMQRestLogger.LOGGER.debug("Handling HEAD request for \"" + uriInfo.getRequestUri() + "\""); Response.ResponseBuilder builder = Response.ok(); setSenderLink(builder, uriInfo); setSenderWithIdLink(builder, uriInfo); setConsumersLink(builder, uriInfo); setPushConsumersLink(builder, uriInfo); return builder.build(); }