libdap Updated for version 3.21.1
libdap4 is an implementation of OPeNDAP's DAP protocol.
libdap::AlarmHandler Class Reference

#include <AlarmHandler.h>

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

Public Member Functions

 AlarmHandler ()
 
 AlarmHandler (FILE *s)
 
 AlarmHandler (ostream &)
 
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 jgall.nosp@m.aghe.nosp@m.r@ope.nosp@m.ndap.nosp@m..org

Definition at line 44 of file AlarmHandler.h.

Constructor & Destructor Documentation

◆ AlarmHandler() [1/3]

libdap::AlarmHandler::AlarmHandler ( )
inline

Definition at line 51 of file AlarmHandler.h.

◆ AlarmHandler() [2/3]

libdap::AlarmHandler::AlarmHandler ( FILE * s)
inlineexplicit

Definition at line 53 of file AlarmHandler.h.

◆ AlarmHandler() [3/3]

libdap::AlarmHandler::AlarmHandler ( ostream & )
inlineexplicit

Store information to be used by the handler.

Parameters
outWrite to this stream.
Deprecated
The stream param is ignored. Use the default constructor instead.

Definition at line 60 of file AlarmHandler.h.

◆ ~AlarmHandler()

virtual libdap::AlarmHandler::~AlarmHandler ( )
inlinevirtual

Definition at line 62 of file AlarmHandler.h.

Member Function Documentation

◆ handle_signal()

virtual void libdap::AlarmHandler::handle_signal ( int signum)
inlinevirtual

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. 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 78 of file AlarmHandler.h.


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