try {
int i = 0;
Iterator itr = consumers.iterator();
while (itr.hasNext()) {
i++;
Consumer c = (Consumer) itr.next();
gp.putProp(String.valueOf(c.getConsumerUID().longValue())+":"
+Consumer.PREFETCH,
new Integer(c.getPrefetch()));
writeConsumer(c, dos);
if (!(c instanceof Subscription)) {
continue;
}
ChangeRecordInfo cri =
((Subscription)c).getCurrentChangeRecordInfo(
ProtocolGlobals.G_NEW_INTEREST);
if (cri == null) {
continue;
}
gp.putProp("shareccSeq"+i, cri.getSeq());
gp.putProp("shareccUUID"+i, cri.getUUID());
gp.putProp("shareccResetUUID"+i, cri.getResetUUID());
}
dos.flush();
bos.flush();
}
catch (IOException e) { /* Ignore */ }
gp.setPayload(ByteBuffer.wrap(bos.toByteArray()));
break;
case ProtocolGlobals.G_INTEREST_UPDATE:
gp.putProp("T", new Integer(subtype));
try {
Iterator itr = consumers.iterator();
while (itr.hasNext()) {
Consumer c = (Consumer)itr.next();
writeConsumerUID(c.getConsumerUID(), dos);
}
dos.flush();
bos.flush();
}
catch (IOException e) { /* Ignore */ }