< Previous by Date Date Index Next by Date >
  Thread Index Next in Thread >

[reSIProcate] Scheduling tasks with ExternalMessageHandler


In order for a DialogUsageManager to perform a task repeatedly, the
following seems like it should be the correct approach (modelled on
KeepAliveManager):

1. Create a class MyMessage, inheriting from ExternalMessageBase.
2. Create a class MyMessageHandler inheriting from
ExternalMessageHandler, that on receiving a MyMessage performs the task
and adds another MyMessage to the Sip Stack to be processed later.
3. Add a MyMessageHandler to the DialogUsageManager, and post the first
MyMessage in some appropriate way.

The problem with this approach is that the SipStack post methods will
only accept an ApplicationMessage, and inheriting from both
ExternalMessageBase and ApplicationMessage surely can't be a good idea.

There doesn't appear to be any reason why ExternalMessageBase shouldn't
inherit from ApplicationMessage - should it, or is there another way of
going about this?

Thanks,

Rob.