* @param publishRequest The request to be published.
* @param rp The response processor.
*/
public void publish(Request publishRequest, RP rp)
throws Exception {
JAResponseCounter3 rc;
int ps = pool.size();
if (ps == 0)
rc = new JAResponseCounter3(pool);
else {
rc = pool.remove(ps - 1);
}
rc.setup(rp);
int i = 0;
while (i < subscribers.size()) {
Subscriber s = subscribers.get(i);
if (publishRequest.isTargetType(s)) {
rc.sent += 1;
publishRequest.send(this, s, rc);
}
i += 1;
}
rc.finished();
}