+ /**
+ * Sends a request containing the given fields and waits for the target
+ * message.
+ *
+ * @param fields
+ * The fields of the message
+ * @param data
+ * The payload of the message
+ * @return The reply message
+ * @throws PluginException
+ * if the request could not be sent
+ */
+ private PluginReply performRequest(SimpleFieldSet fields, Bucket data) throws PluginException {
+ logger.log(Level.FINE, format("Sending FCP Request: %s", fields.get("Message")));
+ PluginReply pluginReply = pluginConnector.sendRequest(WOT_PLUGIN_NAME, "", fields, data);
+ logger.log(Level.FINEST, format("Received FCP Response for %s: %s", fields.get("Message"), pluginReply.getFields().get("Message")));
+ if ("Error".equals(pluginReply.getFields().get("Message"))) {
+ throw new PluginException("Could not perform request for " + fields.get("Message"));
+ }
+ return pluginReply;