All Implemented Interfaces:
Processor, Adapter

public class ParserAdapter extends ProcessorAdapter
Adapts a Parser.
Author:
Martin Krasser
  • Constructor Details

    • ParserAdapter

      public ParserAdapter(Parser parser)
      Creates a new ParserAdapter and sets the delegate Parser.
      Parameters:
      parser - a parser.
  • Method Details

    • doProcess

      protected void doProcess(Exchange exchange, Object inputData, Object... inputParams) throws Exception
      Processes input data and populates the output message. This method delegates message processing to more specialized doProcess implementations.
      Specified by:
      doProcess in class ProcessorAdapter
      Parameters:
      exchange - message exchange where to write processing results.
      inputData - input data.
      inputParams - input parameters.
      Throws:
      Exception - if a processing error occurs.
      See Also:
    • doProcess

      protected Object doProcess(InputStream inputData, Object... inputParams) throws IOException
      Parses inputData using inputParams and returns the parsing result. Parsing is delegated to the Parser set at construction time.
      Parameters:
      inputData - input data
      inputParams - input parameters
      Returns:
      parsing result
      Throws:
      IOException - if a system-level problem occurs
    • doProcess

      protected Object doProcess(Reader inputData, Object... inputParams) throws IOException
      Parses inputData using inputParams and returns the parsing result. Parsing is delegated to the Parser set at construction time.
      Parameters:
      inputData - input data
      inputParams - input parameters
      Returns:
      parsing result
      Throws:
      IOException - if a system-level problem occurs
    • doProcess

      protected Object doProcess(Source inputData, Object... inputParams) throws IOException
      Parses inputData using inputParams and returns the parsing result. Parsing is delegated to the Parser set at construction time.
      Parameters:
      inputData - input data
      inputParams - input parameters
      Returns:
      parsing result
      Throws:
      IOException - if a system-level problem occurs
    • doProcess

      protected Object doProcess(String inputData, Object... inputParams)
      Parses inputData using inputParams and returns the parsing result. Parsing is delegated to the Parser set at construction time.
      Parameters:
      inputData - input data
      inputParams - input parameters
      Returns:
      parsing result