返回链中下一个解析器类(如果有的话)从的名称的可选函数。 它允许解析器将处理消息内容的下一个段或余数的解析器类的名称返回给代理。通常,对于有简单格式类型的消息,仅有一个消息内容解析器;不必提供此函数。对于带有多个消息解析器的复杂格式类型,每个解析器应该标识链中的下一个,这是通过返回 buffer 参数中的名称来进行的。链中的最后一个解析器必须返回空字符串。
如果您指定与 WebSphere Message Broker 一起提供的解析器名称,则必须使用正确的解析器类名。
在其中定义 | 类型 | 成员 |
CPI_VFT | 可选 | iFpNextParserClassName |
void cpiNextParserClassName( CciParser* parser, CciContext* context, CciChar* buffer, int size);
无。
此示例取自样本解析器文件 BipSampPluginParser.c(732 行到 756 行):
void cpiNextParserClassName( CciParser* parser, CciContext* context, CciChar* buffer, int size ){ PARSER_CONTEXT_ST* pc = (PARSER_CONTEXT_ST *)context ; int rc = 0; if (pc->trace) { fprintf(pc->tracefile, "PLUGIN: -> cpiNextParserClassName() parser=0x%x context=0x%x\n", parser, context); fflush(pc->tracefile); } /* Copy the name to the broker */ CciCharNCpy(buffer, pc->iNextParserClassName, size); if (pc->trace) { fprintf(pc->tracefile, "PLUGIN: <- cpiNextParserClassName()\n"); fflush(pc->tracefile); } return; }