libdap++ Updated for version 3.8.2

libdap::AlarmHandler Class Reference

#include <AlarmHandler.h>

Inheritance diagram for libdap::AlarmHandler:
Collaboration diagram for libdap::AlarmHandler:

List of all members.

Public Member Functions

 AlarmHandler (FILE *s)
 AlarmHandler (ostream &out)
virtual void handle_signal (int signum)
virtual ~AlarmHandler ()

Detailed Description

Handle the time out alarm. When an OPeNDAP server runs until the time out alarm is triggered, this class provides the concrete implementation of EventHandler::handle_signal().

See also:
EventHandler
SignalHandler
Author:
James Gallagher <jgallagher@opendap.org>

Definition at line 47 of file AlarmHandler.h.


Constructor & Destructor Documentation

libdap::AlarmHandler::AlarmHandler ( FILE *  s) [inline]

Store information to be used by the handler.

Parameters:
sWrite to this stream.

Definition at line 68 of file AlarmHandler.h.

libdap::AlarmHandler::AlarmHandler ( ostream &  out) [inline]

Definition at line 71 of file AlarmHandler.h.

virtual libdap::AlarmHandler::~AlarmHandler ( ) [inline, virtual]

Definition at line 78 of file AlarmHandler.h.


Member Function Documentation

virtual void libdap::AlarmHandler::handle_signal ( int  signum) [inline, virtual]

Handle an alarm signal. When one of our servers gets an alarm, that means it has hit its time out. We need to dump two CRLF pairs down the stream and then send an Error object explaining that a timeout has been reached.

Because this is a signal handler, it should call only reentrant system services, functions, et cetera. Generally that eliminates stdio functions but I'm using them anyway. This handler never returns to the code that was running when the alarm signal was raised.

Parameters:
signumWe know it is SIGALRM; here as a check
Returns:
Never returns; calls exit after sending the Error object.

Implements libdap::EventHandler.

Definition at line 98 of file AlarmHandler.h.


The documentation for this class was generated from the following file: