rwsf::ServletUnavailableException rwsf::ServletException rwsf::Exception
#include <rwsf/servlet/except.h>
A servlet throws rwsf::ServletUnavailableException to indicate to the Agent that the servlet cannot process requests.
ServletUnavailableException(const char* msg); ServletUnavailableException(const ExceptionMessage& 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(const char* msg, int seconds); ServletUnavailableException(const ExceptionMessage& msg, int seconds);
Constructs a new exception with the given msg and the number of seconds that the servlet will be unavailable. A 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.
NOTE -- If a servlet throws rwsf::ServletUnavailableException from init(), that servlet will not be placed into service regardless of whether the exception specifies a timeout.
virtual ~ServletUnavailableException();
Destructor.
int getUnavailableSeconds() const;
Returns the number of seconds this servlet is unavailable. Returns -1 if the servlet is permanently unavailable.
bool isPermanent() const;
Returns true if this servlet is permanently unavailable, false otherwise.
©2004-2007 Copyright Quovadx, Inc. All Rights Reserved.
Quovadx and Rogue Wave are registered trademarks of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.