@DELETE @Path("broker") public void deleteConfiguration() { broker.setConfiguration(new Configuration()); // Broadcast new stream list OutboundEvent.Builder eventBuilder = new OutboundEvent.Builder(); OutboundEvent event = eventBuilder .name("broker") .mediaType(MediaType.APPLICATION_JSON_TYPE) .data(Configuration.class, broker.getConfiguration()) .build(); broadcaster.broadcast(event); }
@PUT @Path("broker") @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) public void setConfiguration(Configuration configuration) { broker.setConfiguration(configuration); // Broadcast new stream list OutboundEvent.Builder eventBuilder = new OutboundEvent.Builder(); OutboundEvent event = eventBuilder .name("broker") .mediaType(MediaType.APPLICATION_JSON_TYPE) .data(Configuration.class, broker.getConfiguration()) .build(); broadcaster.broadcast(event); }