Search in sources :

Example 6 with ManagementController

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

the class RestServlet method doDelete.

@Override
protected void doDelete(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.handleDelete(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)

Example 7 with ManagementController

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

the class RestServlet method doPut.

@Override
protected void doPut(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.handlePut(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)

Example 8 with ManagementController

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

the class RestServlet method doGet.

@Override
protected void doGet(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.handleGet(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)

Example 9 with ManagementController

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

the class ExchangeControllerTest method setUp.

@Before
public void setUp() {
    _legacyManagementController = mock(LegacyManagementController.class);
    final ManagementController nextVersionManagementController = mock(ManagementController.class);
    when(_legacyManagementController.getNextVersionManagementController()).thenReturn(nextVersionManagementController);
}
Also used : LegacyManagementController(org.apache.qpid.server.management.plugin.controller.LegacyManagementController) ManagementController(org.apache.qpid.server.management.plugin.ManagementController) LegacyManagementController(org.apache.qpid.server.management.plugin.controller.LegacyManagementController) Before(org.junit.Before)

Example 10 with ManagementController

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

the class LegacyManagementControllerTest method setUp.

@Before
public void setUp() {
    final ManagementController nextVersionManagementController = mock(ManagementController.class);
    _controller = new LegacyManagementController(nextVersionManagementController, LegacyManagementControllerFactory.MODEL_VERSION);
    _controller.initialize();
}
Also used : ManagementController(org.apache.qpid.server.management.plugin.ManagementController) Before(org.junit.Before)

Aggregations

ManagementController (org.apache.qpid.server.management.plugin.ManagementController)14 Before (org.junit.Before)9 LegacyManagementController (org.apache.qpid.server.management.plugin.controller.LegacyManagementController)7 ManagementException (org.apache.qpid.server.management.plugin.ManagementException)4 ManagementRequest (org.apache.qpid.server.management.plugin.ManagementRequest)4 ManagementResponse (org.apache.qpid.server.management.plugin.ManagementResponse)4 ServletConfig (javax.servlet.ServletConfig)1 ServletContext (javax.servlet.ServletContext)1 ServletException (javax.servlet.ServletException)1 LegacyConfiguredObject (org.apache.qpid.server.management.plugin.controller.LegacyConfiguredObject)1 ConfiguredObject (org.apache.qpid.server.model.ConfiguredObject)1