Logo Search packages:      
Sourcecode: poco version File versions  Download package

HTTPSTimeServer Class Reference

Inheritance diagram for HTTPSTimeServer:

Poco::Util::ServerApplication Poco::Util::Application Poco::Util::Subsystem Poco::RefCountedObject

List of all members.


Detailed Description

The main application class.

This class handles command-line arguments and configuration files. Start the HTTPTimeServer executable with the help option (/help on Windows, --help on Unix) for the available command line options.

To use the sample configuration file (HTTPTimeServer.properties), copy the file to the directory where the HTTPTimeServer executable resides. If you start the debug version of the HTTPTimeServer (HTTPTimeServerd[.exe]), you must also create a copy of the configuration file named HTTPTimeServerd.properties. In the configuration file, you can specify the port on which the server is listening (default 9980) and the format of the date/time string sent back to the client.

To test the TimeServer you can use any web browser (https://localhost:9980/).

Definition at line 136 of file HTTPSTimeServer.cpp.


Public Types

enum  ConfigPriority { PRIO_APPLICATION = -100, PRIO_DEFAULT = 0, PRIO_SYSTEM = 100 }
enum  ExitCode {
  EXIT_OK = 0, EXIT_USAGE = 64, EXIT_DATAERR = 65, EXIT_NOINPUT = 66,
  EXIT_NOUSER = 67, EXIT_NOHOST = 68, EXIT_UNAVAILABLE = 69, EXIT_SOFTWARE = 70,
  EXIT_OSERR = 71, EXIT_OSFILE = 72, EXIT_CANTCREAT = 73, EXIT_IOERR = 74,
  EXIT_TEMPFAIL = 75, EXIT_PROTOCOL = 76, EXIT_NOPERM = 77, EXIT_CONFIG = 78
}

Public Member Functions

void addSubsystem (Subsystem *pSubsystem)
 Creates the Application and calls init(argc, argv).
std::string commandName () const
LayeredConfiguration & config () const
 Returns the command name used to invoke the application.
void duplicate () const
template<class C>
C & getSubsystem () const
void init (const std::vector< std::string > &args)
void init (int argc, char *argv[])
bool initialized () const
bool isInteractive () const
 Destroys the ServerApplication.
void loadConfiguration (const std::string &path, int priority=PRIO_DEFAULT)
int loadConfiguration (int priority=PRIO_DEFAULT)
Poco::Loggerlogger () const
 Returns the application's configuration.
const char * name () const
const OptionSet & options () const
int referenceCount () const
void release () const
 Increments the object's reference count.
int run (int argc, char **argv)
void setUnixOptions (bool flag)
const Poco::TimestampstartTime () const
void stopOptionsProcessing ()
 Returns the application uptime.
Poco::Timespan uptime () const
 Returns the application start time (UTC).

Static Public Member Functions

static Application & instance ()
 Returns the application's option set.

Protected Member Functions

void defineOptions (OptionSet &options)
void displayHelp ()
bool findFile (Poco::Path &path) const
void handleOption (const std::string &name, const std::string &value)
void init ()
void initialize (Application &self)
int main (const std::vector< std::string > &args)
 Sets the logger used by the application.
void reinitialize (Application &self)
int run ()
void setLogger (Poco::Logger &logger)
void uninitialize ()
void waitForTerminationRequest ()

Static Protected Member Functions

static void terminate ()

Private Attributes

bool _helpRequested

Friends

class Application
 Destroys the Subsystem.

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

Generated by  Doxygen 1.6.0   Back to index