Hearbeat and listeners class-VBForums
Results 1 to 1 of 1

Thread: Hearbeat and listeners class

  1. #1

    Thread Starter
    Join Date
    Jul 2002
    Dublin, Ireland

    Hearbeat and listeners class

    A heartbeat is a periodic event that tells you that your application is running. In this example the heartbeat is implemented by a static "heartbeat" class which has a "beat" event that fires every second.

    The beat is passed on to any listeners that have been attached to the heartbeat. You can do this by adding listeners to the application configuration e.g.:-

      <section name ="heartbeatSettings" 
          type="Monitoring.HeartbeatCustomConfigSection, Monitoring, 
    <!-- ... -->
          <clear />
          <add Name="HeartbeatTrace"  
                Type="Monitoring.TraceHeartbeatMonitor, Monitoring, 
                      Version=,Culture=neutral,PublicKeyToken=null" />
          <add Name="HeartbeatTraceTwo" 
                Type="Monitoring.TraceHeartbeatMonitor, Monitoring, 
                InitData="foo" />
    And then the only thing you need to do is to ask the heartbeat class to read its listeners collection from the configuration file by:-
    You can create your own listener - to send heartbeats over the network or have a beating icon in the tray or what ever by inheritting from HeartbeatListenerBase
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts


Click Here to Expand Forum to Full Width

Survey posted by VBForums.