WebSphere Message Broker バージョン 8.0.0.5 オペレーティング・システム: AIX、HP-Itanium、Linux、Solaris、Windows、z/OS

製品の最新バージョンについては、IBM Integration Bus バージョン 9.0 をご覧ください。

cpiParseBufferFormatted

この関数は、cpiParseBuffer() インプリメンテーション関数の機能を拡張し、入力メッセージに関する追加情報を提供します。

以下の追加情報を使用できます。
  1. 入力メッセージを表すために使用されるエンコードおよびコード化文字セット。
  2. そのメッセージのメッセージ・セット、タイプ、および形式。

このインプリメンテーション関数が CPI_VFT 構造で提供されている場合、cpiParseBuffer() または cpiParseBufferEncoded() のどちらも指定できません。指定した場合、cpiDefineParserClass() 関数は失敗し、CCI_INVALID_IMPL_FUNCTION の戻りコードが出されます。

定義されている場所 タイプ メンバー
CPI_VFT 条件付き iFpParseBufferFormatted

構文

int cpiParseBufferFormatted(
  CciParser*     parser,
  CciContext*    context,
  int            encoding,
  int            ccsid,
  CciChar*       set,
  CciChar*       type,
  CciChar*       format); 

パラメーター

parser
パーサー・オブジェクトのアドレス (入力)。
context
パーサー・オブジェクトが所有するコンテキストのアドレス (入力)。
encoding
メッセージ・バッファーのエンコード (入力)。
ccsid
メッセージ・バッファーの CCSID (入力)。
set
メッセージが属するメッセージ・セット (入力)。
type
メッセージ・タイプ (入力)。
format
メッセージ形式 (入力)。

戻り値

パーサーが所有権を持っているメッセージ・バッファーの残りの部分のサイズ (バイト数)。

サンプル

この例は、サンプル・パーサー・ファイル BipSampPluginParser.c から取られています。

int cpiParseBufferFormatted(
  CciParser*     parser,
  CciContext*    context,
  int            encoding,
  int            ccsid,
  CciChar*       set,
  CciChar*       type,
  CciChar*       format
){
  PARSER_CONTEXT_ST* pc = (PARSER_CONTEXT_ST *)context ;
  int                rc;

  /* Get a pointer to the message buffer and set the offset */
  pc->iBuffer = (void *)cpiBufferPointer(&rc, parser);
  pc->iIndex = 0;

  /* Save the format of the buffer */
  pc->iEncoding = encoding;
  pc->iCcsid = ccsid;

  /* Save size of the buffer */
  pc->iSize = cpiBufferSize(&rc, parser);

  /* Prime the first byte in the stream */
  pc->iCurrentCharacter = cpiBufferByte(&rc, parser, pc->iIndex);

  /* Set the current element to the root element */
  pc->iCurrentElement = cpiRootElement(&rc, parser);

  /* Reset flag to ensure parsing is reset correctly */
  pc->iInTag = 0;

  if (pc->trace) {
    fprintf(pc->tracefile, "PLUGIN: <- cpiParseBufferFormatted() 
    retvalue=%d¥n", pc->iSize);
    fflush(pc->tracefile);
  }
特記事項 | 商標 | ダウンロード | ライブラリー | サポート | フィードバック

Copyright IBM Corporation 1999, 2014Copyright IBM Corporation 1999, 2014.

        
        最終更新:
        
        最終更新: 2015-02-28 17:48:07


参照トピック参照トピック | バージョン 8.0.0.5 | as08170_