+
+ /**
+ * Manages the Xacml-Pdp rest controller based on the Xacml-Pdp State.
+ * Current supported states:
+ * ACTIVE - rest service is running and handling requests
+ * PASSIVE - rest service is not running
+ */
+ private void handleXacmlRestController() {
+ if (status.getState() == PdpState.ACTIVE) {
+ LOGGER.info("State change: {} - Starting rest controller", status.getState());
+ XacmlPdpActivator.getCurrent().startXacmlRestController();
+ } else if (status.getState() == PdpState.PASSIVE) {
+ LOGGER.info("State change: {} - Stopping rest controller", status.getState());
+ XacmlPdpActivator.getCurrent().stopXacmlRestController();
+ } else {
+ // unsupported state
+ LOGGER.warn("Unsupported state: {}", status.getState());
+ }
+ }