gov.nist.javax.sip.parser
Interface ParseExceptionListener
- All Known Subinterfaces:
- SIPMessageListener
- All Known Implementing Classes:
- TCPMessageChannel, TLSMessageChannel, UDPMessageChannel
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.
- Version:
- 1.2 $Revision: 1.7 $ $Date: 2009/07/17 18:58:01 $
handleException
void handleException(ParseException ex,
SIPMessage sipMessage,
Class headerClass,
String headerText,
String messageText)
throws ParseException
- 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 SIPMessage being parsed).
- 3. Re-Parsing the bad header and adding it to the sipMessage
- Parameters:
ex
- - parse exception being processed.sipMessage
- -- sip message being processed.headerText
- -- header/RL/SL text being parsed.messageText
- -- message where this header was detected.
- Throws:
ParseException
A product of the NIST/ITL Advanced Networking Technologies Division.
See conditions of use.
Submit a bug report or feature request.