gov.nist.javax.sip.parser
Interface ParseExceptionListener
- All Known Subinterfaces:
- SIPMessageListener
- All Known Implementing Classes:
- TCPMessageChannel, 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.
handleException
public void handleException(ParseException ex,
gov.nist.javax.sip.message.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.
ParseException
A product of the NIST/ITL Advanced Networking Technologies Division.
See conditions of use.
Get the latest distribution.
Submit a bug report or feature request.