Class ListenerResource

java.lang.Object
org.apache.druid.server.listener.resource.ListenerResource

public abstract class ListenerResource extends Object
This is a simple announcement resource that handles simple items that have a POST to an announcement endpoint, a GET of something in that endpoint with an ID, and a DELETE to that endpoint with an ID. The idea of this resource is simply to have a simple endpoint for basic POJO handling assuming the POJO has an ID which distinguishes it from others of its kind. This resource is expected to NOT block for POSTs, and is instead expected to make a best effort at returning as quickly as possible. Thus, returning ACCEPTED instead of OK is normal for POST methods here. Items tagged with a particular ID for an announcement listener are updated by a POST to the announcement listener's path "/{announcement}"
  • Field Details

  • Constructor Details

    • ListenerResource

      public ListenerResource(com.fasterxml.jackson.databind.ObjectMapper jsonMapper, com.fasterxml.jackson.databind.ObjectMapper smileMapper, ListenerHandler handler)
  • Method Details

    • serviceAnnouncementPOSTAll

      public javax.ws.rs.core.Response serviceAnnouncementPOSTAll(InputStream inputStream, @Context javax.servlet.http.HttpServletRequest req)
    • serviceAnnouncementHandleUpdates

      public javax.ws.rs.core.Response serviceAnnouncementHandleUpdates(InputStream inputStream, @Context javax.servlet.http.HttpServletRequest req)
    • getAll

      public javax.ws.rs.core.Response getAll()
    • serviceAnnouncementGET

      public javax.ws.rs.core.Response serviceAnnouncementGET(String id)
    • serviceAnnouncementDELETE

      public javax.ws.rs.core.Response serviceAnnouncementDELETE(String id)
    • serviceAnnouncementPOST

      public javax.ws.rs.core.Response serviceAnnouncementPOST(String id, InputStream inputStream, @Context javax.servlet.http.HttpServletRequest req)
    • makeNullIdResponse

      public static javax.ws.rs.core.Response makeNullIdResponse()