HydraExpress™ C++ API Reference Guide

 
Loading...
Searching...
No Matches
rwsf::ServletUnavailableException Class Reference

Throws an rwsf::ServletUnavailableException. More...

#include <rwsf/servlet/except.h>

Inheritance diagram for rwsf::ServletUnavailableException:
rwsf::ServletException rwsf::Exception

Public Member Functions

 ServletUnavailableException (const char *msg)
 ServletUnavailableException (const char *msg, int seconds)
 ~ServletUnavailableException () noexcept
virtual Exceptionclone (void) const
int getUnavailableSeconds () const
bool isPermanent () const
virtual void raise (void) const
Public Member Functions inherited from rwsf::ServletException
 ServletException (const char *)
 ~ServletException () noexcept
Public Member Functions inherited from rwsf::Exception
 Exception (const char *msg)
 Exception (const Exception &)
 Exception (const ExceptionInfo &eInfo)
 Exception (const rwsf::ExceptionInfo &eInfo, const LocalizedMessage &msg)
 Exception (const std::string &msg)
virtual ~Exception () noexcept
const char * getFileName () const
const char * getFunctionName () const
unsigned long getLineNumber () const
virtual bool operator!= (const Exception exc2)
Exceptionoperator= (const Exception &m)
virtual bool operator== (const Exception exc2)
virtual const char * what () const noexcept

Additional Inherited Members

Detailed Description

A servlet throws rwsf::ServletUnavailableException to indicate to the Agent that the servlet cannot process requests.

Constructor & Destructor Documentation

◆ ServletUnavailableException() [1/2]

rwsf::ServletUnavailableException::ServletUnavailableException ( const char * msg)

Constructs a new exception with the given msg. This exception notifies the Agent that the servlet is not available to receive requests. An exception created with this constructor returns true from isPermanent().

◆ ServletUnavailableException() [2/2]

rwsf::ServletUnavailableException::ServletUnavailableException ( const char * msg,
int seconds )

Constructs a new exception with the given msg and the number of seconds that the servlet will be unavailable. An rwsf::ServletUnavailableException that contains a number of seconds indicates that the failure is temporary. The Agent may either remove the servlet or suspend requests to the servlet for at least the number of seconds specified.

◆ ~ServletUnavailableException()

rwsf::ServletUnavailableException::~ServletUnavailableException ( )
noexcept

Destructor.

Member Function Documentation

◆ clone()

virtual Exception * rwsf::ServletUnavailableException::clone ( void ) const
virtual

Creates a new copy of self on the heap. Overridden in derived classes to construct an instance of the correct derived type. It is up to the user to ensure that the returned Exception object is deleted.

Reimplemented from rwsf::ServletException.

◆ getUnavailableSeconds()

int rwsf::ServletUnavailableException::getUnavailableSeconds ( ) const

Returns the number of seconds this servlet is unavailable. Returns -1 if the servlet is permanently unavailable.

◆ isPermanent()

bool rwsf::ServletUnavailableException::isPermanent ( ) const

Returns true if this servlet is permanently unavailable, otherwise returns false.

◆ raise()

virtual void rwsf::ServletUnavailableException::raise ( void ) const
virtual

Throws self. Overridden in derived classes to throw the correct derived type.

Reimplemented from rwsf::ServletException.

Copyright © 2026 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.