FileDocCategorySizeDatePackage
ParseExceptionListener.javaAPI DocphoneME MR2 API (J2ME)2462Wed May 02 18:00:42 BST 2007gov.nist.siplite.parser

ParseExceptionListener

public interface ParseExceptionListener
A listener interface that enables customization of parse error handling. An class that implements this interface is registered with the parser and is called back from the parser handle parse errors.

Fields Summary
Constructors Summary
Methods Summary
public voidhandleException(ParseException ex, Message sipMessage, java.lang.Class headerClass, java.lang.String headerText, java.lang.String messageText)
This gets called from the parser when a parse error is generated. The handler is supposed to introspect on the error class and header name to handle the error appropriately. The error can be handled by :
  • 1. Re-throwing an exception and aborting the parse.
  • 2. Ignoring the header (attach the unparseable header to the Message being parsed).
  • 3. Re-Parsing the bad header and adding it to the sipMessage

param
ex parse exception being processed.
param
sipMessage sip message being processed.
param
headerClass the parser for the particular header
param
headerText header/RL/SL text being parsed.
param
messageText message where this header was detected.