@RestController @ConditionalOnProperty(prefix="bullet.pubsub.builtin.rest", name="enabled", havingValue="true") public class RESTPubSubController extends Object
Constructor and Description |
---|
RESTPubSubController(RESTPubSubService restPubSubService)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getQuery(javax.servlet.http.HttpServletResponse response)
The method that handles reading a query.
|
String |
getResult(javax.servlet.http.HttpServletResponse response)
The method that handles reading a result.
|
void |
postQuery(String query)
The method that handles adding queries to the query queue.
|
void |
postResult(String result)
The method that handles adding results to the result queue.
|
@Autowired public RESTPubSubController(RESTPubSubService restPubSubService)
restPubSubService
- The RESTPubSubService
to use.@PostMapping(path="${bullet.pubsub.builtin.rest.result.path}", consumes="application/json") public void postResult(@RequestBody String result)
RESTPubSubService
to add the result to the queue.result
- The result to add to the queue.@GetMapping(path="${bullet.pubsub.builtin.rest.result.path}", produces="application/json") public String getResult(javax.servlet.http.HttpServletResponse response)
response
- The HttpServletResponse
that will be used to set the response status code.@PostMapping(path="${bullet.pubsub.builtin.rest.query.path}", consumes="application/json") public void postQuery(@RequestBody String query)
RESTPubSubService
to add the query to the queue.query
- The query to add to the queue.@GetMapping(path="${bullet.pubsub.builtin.rest.query.path}", produces="application/json") public String getQuery(javax.servlet.http.HttpServletResponse response)
response
- The HttpServletResponse
that will be used to set the response status code.Copyright © 2021 Pivotal Software, Inc.. All rights reserved.