Class ListenerResource
java.lang.Object
org.apache.druid.server.listener.resource.ListenerResource
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionListenerResource(com.fasterxml.jackson.databind.ObjectMapper jsonMapper, com.fasterxml.jackson.databind.ObjectMapper smileMapper, ListenerHandler handler) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.ResponsegetAll()static javax.ws.rs.core.Responsejavax.ws.rs.core.Responsejavax.ws.rs.core.Responsejavax.ws.rs.core.ResponseserviceAnnouncementHandleUpdates(InputStream inputStream, javax.servlet.http.HttpServletRequest req) javax.ws.rs.core.ResponseserviceAnnouncementPOST(String id, InputStream inputStream, javax.servlet.http.HttpServletRequest req) javax.ws.rs.core.ResponseserviceAnnouncementPOSTAll(InputStream inputStream, javax.servlet.http.HttpServletRequest req)
-
Field Details
-
BASE_PATH
- See Also:
-
-
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
-
serviceAnnouncementDELETE
-
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()
-