use of org.eclipse.ecf.internal.bulletinboard.commons.webapp.WebRequest in project ecf by eclipse.
the class VBulletin method createMemberPageRequest.
@Override
protected WebRequest createMemberPageRequest(ID id) {
WebRequest request = new GetRequest(httpClient, url, "member.php");
NameValuePair[] params = { new NameValuePair("u", String.valueOf(((MemberID) id).getLongValue())) };
request.setParameters(params);
return request;
}
use of org.eclipse.ecf.internal.bulletinboard.commons.webapp.WebRequest in project ecf by eclipse.
the class ThreadBrowser2 method fetchNewMessages.
public List<IThreadMessage> fetchNewMessages() throws BBException {
List<IThreadMessage> messages = new ArrayList<IThreadMessage>();
try {
int nextPage = STARTPAGE;
SkippedStatus skipped = new SkippedStatus();
while (nextPage > NONE) {
WebRequest req = createRequest(nextPage);
req.execute();
String resp = req.getResponseBodyAsString();
req.releaseConnection();
messages.addAll(0, bb.getParser().parseMessages2(resp, thread.lastReadMessageId, true, skipped));
if (skipped.messagesSkipped) {
nextPage = NONE;
} else {
nextPage = bb.getParser().parseNextPage(resp);
}
}
} catch (IOException e) {
e.printStackTrace();
}
return messages;
}
Aggregations