Search in sources :

Example 6 with ManagementException

use of org.apache.qpid.server.management.plugin.ManagementException in project qpid-broker-j by apache.

the class RestServlet method doPost.

@Override
protected void doPost(final HttpServletRequest httpServletRequest, final HttpServletResponse httpServletResponse, final ConfiguredObject<?> managedObject) throws IOException {
    try {
        final ManagementRequest request = new ServletManagementRequest(managedObject, httpServletRequest);
        final ManagementController controller = getManagementController();
        final ManagementResponse response = controller.handlePost(request);
        sendResponse(request, response, httpServletRequest, httpServletResponse, controller);
    } catch (ManagementException e) {
        sendResponse(e, httpServletRequest, httpServletResponse);
    }
}
Also used : ManagementRequest(org.apache.qpid.server.management.plugin.ManagementRequest) ManagementException(org.apache.qpid.server.management.plugin.ManagementException) ManagementResponse(org.apache.qpid.server.management.plugin.ManagementResponse) ManagementController(org.apache.qpid.server.management.plugin.ManagementController)

Aggregations

ManagementException (org.apache.qpid.server.management.plugin.ManagementException)6 ManagementController (org.apache.qpid.server.management.plugin.ManagementController)5 ManagementResponse (org.apache.qpid.server.management.plugin.ManagementResponse)5 ManagementRequest (org.apache.qpid.server.management.plugin.ManagementRequest)4 HashMap (java.util.HashMap)2 LegacyConfiguredObject (org.apache.qpid.server.management.plugin.controller.LegacyConfiguredObject)2 ConfiguredObject (org.apache.qpid.server.model.ConfiguredObject)2 StandardCharsets (java.nio.charset.StandardCharsets)1 ArrayList (java.util.ArrayList)1 Collection (java.util.Collection)1 Collections (java.util.Collections)1 LinkedHashMap (java.util.LinkedHashMap)1 List (java.util.List)1 Map (java.util.Map)1 UUID (java.util.UUID)1 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)1 Collectors (java.util.stream.Collectors)1 Stream (java.util.stream.Stream)1 HttpServletResponse (javax.servlet.http.HttpServletResponse)1 ManagementException.createBadRequestManagementException (org.apache.qpid.server.management.plugin.ManagementException.createBadRequestManagementException)1