if (identification == null || serverURL == null) {
logWarning("No identification or server URL present, cannot send feedback!");
return;
}
ConnectionHandler connectionHandler = getConnectionHandler();
URLConnection sendConnection = null;
Writer writer = null;
try {
URL sendURL = new URL(serverURL, m_name + "/" + COMMAND_SEND);
sendConnection = connectionHandler.getConnection(sendURL);
sendConnection.setDoOutput(true);
if (sendConnection instanceof HttpURLConnection) {
((HttpURLConnection) sendConnection).setChunkedStreamingMode(8192);
}
writer = new BufferedWriter(new OutputStreamWriter(sendConnection.getOutputStream()));
SortedSet<Long> storeIDs = m_storeManager.getAllFeedbackStoreIDs();
for (Long storeID : storeIDs) {
URL queryURL = new URL(serverURL, m_name + "/" + COMMAND_QUERY + "?" + PARAMETER_TARGETID + "=" + identification + "&" + PARAMETER_LOGID + "=" + storeID);
URLConnection queryConnection = connectionHandler.getConnection(queryURL);
try {
synchronizeStore(storeID, queryConnection.getInputStream(), writer);
}
catch (IOException e) {
handleIOException(queryConnection);