dtn::DTNServer Class Reference

#include <DTNServer.h>

List of all members.

Public Types

typedef void(* ShutdownProc )(void *args)
 Typedef for a shutdown procedure.

Public Member Functions

 DTNServer (const char *logpath, DTNStorageConfig *storage_config)
 ~DTNServer ()
DTNStorageConfigstorage_config ()
void init ()
bool init_datastore ()
 Initialize the datastore.
void close_datastore ()
 Close and sync the data store.
void start ()
 Start DTN daemon.
bool parse_conf_file (std::string &conf_file, bool conf_file_set)
 Parse the conf file.
void shutdown ()
 Shut down the server.
void set_app_shutdown (ShutdownProc proc, void *data)
 Set an application-specific shutdown handler.

Private Member Functions

bool init_dir (const char *dirname)
bool tidy_dir (const char *dirname)
bool validate_dir (const char *dirname)
void init_commands ()
 Initialize and register all the server related dtn commands.
void init_components ()
 Initialize all components before modifying any configuration.

Private Attributes

bool init_
oasys::atomic_t in_shutdown_
DTNStorageConfigstorage_config_
oasys::DurableStore * store_

Detailed Description

Encapsulation class for the "guts" of the server library.

Definition at line 31 of file DTNServer.h.


Member Typedef Documentation

typedef void(* dtn::DTNServer::ShutdownProc)(void *args)

Typedef for a shutdown procedure.

Definition at line 63 of file DTNServer.h.


Constructor & Destructor Documentation

dtn::DTNServer::DTNServer ( const char *  logpath,
DTNStorageConfig storage_config 
)

Definition at line 67 of file DTNServer.cc.

dtn::DTNServer::~DTNServer (  ) 

Definition at line 76 of file DTNServer.cc.


Member Function Documentation

void dtn::DTNServer::close_datastore (  ) 

Close and sync the data store.

Definition at line 244 of file DTNServer.cc.

Referenced by dtn::DTND::main().

void dtn::DTNServer::init (  ) 

Initialize storage, components

NOTE: This needs to be called with thread barrier and timer system off because of initialization ordering constraints.

Definition at line 82 of file DTNServer.cc.

Referenced by dtn::DTND::main().

void dtn::DTNServer::init_commands (  )  [private]

Initialize and register all the server related dtn commands.

Definition at line 203 of file DTNServer.cc.

void dtn::DTNServer::init_components (  )  [private]

Initialize all components before modifying any configuration.

Definition at line 232 of file DTNServer.cc.

bool dtn::DTNServer::init_datastore (  ) 

Initialize the datastore.

Definition at line 99 of file DTNServer.cc.

Referenced by dtn::DTND::main().

bool dtn::DTNServer::init_dir ( const char *  dirname  )  [private]

Definition at line 286 of file DTNServer.cc.

bool dtn::DTNServer::parse_conf_file ( std::string &  conf_file,
bool  conf_file_set 
)

Parse the conf file.

Definition at line 152 of file DTNServer.cc.

Referenced by dtn::DTND::main().

void dtn::DTNServer::set_app_shutdown ( ShutdownProc  proc,
void *  data 
)

Set an application-specific shutdown handler.

Definition at line 280 of file DTNServer.cc.

void dtn::DTNServer::shutdown (  ) 

Shut down the server.

Definition at line 258 of file DTNServer.cc.

Referenced by dtn::DTND::main().

void dtn::DTNServer::start (  ) 

Start DTN daemon.

Definition at line 91 of file DTNServer.cc.

Referenced by dtn::DTND::main().

DTNStorageConfig* dtn::DTNServer::storage_config (  )  [inline]

Definition at line 37 of file DTNServer.h.

References storage_config_.

bool dtn::DTNServer::tidy_dir ( const char *  dirname  )  [private]

Definition at line 310 of file DTNServer.cc.

bool dtn::DTNServer::validate_dir ( const char *  dirname  )  [private]

Definition at line 344 of file DTNServer.cc.


Member Data Documentation

oasys::atomic_t dtn::DTNServer::in_shutdown_ [private]

Definition at line 70 of file DTNServer.h.

Definition at line 69 of file DTNServer.h.

Definition at line 72 of file DTNServer.h.

Referenced by storage_config().

oasys::DurableStore* dtn::DTNServer::store_ [private]

Definition at line 73 of file DTNServer.h.


The documentation for this class was generated from the following files:
Generated on Sun Nov 21 13:21:20 2010 for DTN Reference Implementation by  doxygen 1.6.3