本文整理汇总了Java中javolution.util.FastMap.Entry方法的典型用法代码示例。如果您正苦于以下问题:Java FastMap.Entry方法的具体用法?Java FastMap.Entry怎么用?Java FastMap.Entry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javolution.util.FastMap
的用法示例。
在下文中一共展示了FastMap.Entry方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processXmlCAPDialog
import javolution.util.FastMap; //导入方法依赖的package包/类
protected void processXmlCAPDialog(XmlCAPDialog xmlCAPDialog, CAPDialog capDialog, boolean isScf, FastList<Long> sentInvokeIds)
throws CAPException {
// marking of incoming Invokes for which there will not be responses / errors
FastList<Long> processInvokeWithoutAnswerIds = xmlCAPDialog.getProcessInvokeWithoutAnswerIds();
for (FastList.Node<Long> n = processInvokeWithoutAnswerIds.head(), end = processInvokeWithoutAnswerIds.tail(); (n = n
.getNext()) != end;) {
capDialog.processInvokeWithoutAnswer(n.getValue());
}
int addedMsgs = 0;
Boolean prearrangedEnd = xmlCAPDialog.getPrearrangedEnd();
// sending of errors
FastMap<Long, CAPErrorMessage> errorMessages = xmlCAPDialog.getErrorComponents().getErrorComponents();
for (FastMap.Entry<Long, CAPErrorMessage> n = errorMessages.head(), end = errorMessages.tail(); (n = n.getNext()) != end;) {
Long invokeId = n.getKey();
CAPErrorMessage capError = n.getValue();
capDialog.sendErrorComponent(invokeId, capError);
addedMsgs++;
}
// sending of Invokes / RRL
FastList<CAPMessage> capMessages = xmlCAPDialog.getCAPMessages();
for (FastList.Node<CAPMessage> n = capMessages.head(), end = capMessages.tail(); (n = n.getNext()) != end;) {
camelStatAggregator.updateMessagesSent();
camelStatAggregator.updateMessagesAll();
CAPMessage capMessage = n.getValue();
if (addedMsgs > 0) {
// we need to test if we have enough free space to send a component in the same massage
int encodedSize;
if (prearrangedEnd != null) {
encodedSize = capDialog.getMessageUserDataLengthOnClose(prearrangedEnd);
} else {
encodedSize = capDialog.getMessageUserDataLengthOnSend();
}
CAPAsnPrimitive asnPrimitive = (CAPAsnPrimitive) capMessage;
AsnOutputStream asnOs = new AsnOutputStream();
int nextMessageSize = 10; // 10 = max component encoding header size
try {
asnPrimitive.encodeAll(asnOs);
nextMessageSize += asnOs.size(); // 10 = max component encoding header size
} catch (CAPException e) {
// ignore it: this means that a message does not have a parameter body
}
if (encodedSize + nextMessageSize + 5 > capDialog.getMaxUserDataLength()) {
capDialog.send();
addedMsgs = 0;
}
}
ProcessComponentResult ps = this.processCAPMessageFromApplication(capMessage, capDialog, isScf);
if (ps.componentAdded)
addedMsgs++;
if (ps.invokeId != null && sentInvokeIds != null) {
sentInvokeIds.add(ps.invokeId);
}
}// for loop
}