TAO_Implementation_Repository  2.3.3
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
Options Class Reference

Maintains the global options. More...

#include <Locator_Options.h>

Collaboration diagram for Options:
Collaboration graph
[legend]

Public Types

enum  SERVICE_COMMAND { SC_NONE, SC_INSTALL, SC_REMOVE }
 
enum  RepoMode {
  REPO_NONE, REPO_XML_FILE, REPO_SHARED_FILES, REPO_HEAP_FILE,
  REPO_REGISTRY
}
 Which type of repository is to be used? More...
 
enum  ImrType { BACKUP_IMR, PRIMARY_IMR, STANDALONE_IMR }
 Indicate what type of ImR Locator this is. More...
 

Public Member Functions

 Options ()
 
int init (int argc, ACE_TCHAR *argv[])
 Parse the command-line arguments and initialize the options. More...
 
int init_from_registry ()
 This version should only be used when run as an nt service. More...
 
bool service (void) const
 Service Mode. More...
 
unsigned int debug (void) const
 Debug level for the Implementation Repository. More...
 
const ACE_TStringior_filename (void) const
 Returns the file where the IOR should be stored. More...
 
bool multicast (void) const
 Will we listen for multicast location requests? More...
 
SERVICE_COMMAND service_command (void) const
 The nt service command to run (install/remove) More...
 
int save_registry_options ()
 
const char * cmdline (void) const
 
const ACE_TStringpersist_file_name (void) const
 
bool readonly (void) const
 Do we allow modifications to the servers? More...
 
RepoMode repository_mode (void) const
 
bool repository_erase (void) const
 Do we wish to clear out the repository. More...
 
ACE_Time_Value startup_timeout (void) const
 Returns the timeout value for program starting. More...
 
bool ping_external (void) const
 
ACE_Time_Value ping_interval (void) const
 
ACE_Time_Value ping_timeout (void) const
 When pinging, this is the timeout. More...
 
LiveCheckpinger (void) const
 
void pinger (LiveCheck *)
 
bool unregister_if_address_reused (void) const
 
bool lockout (void) const
 
bool throw_shutdown_exceptions (void) const
 
ImrType imr_type (void) const
 
int threads (void) const
 
const ACE_CStringft_endpoint (void) const
 
ACE_Time_Value ft_update_delay (void) const
 

Private Member Functions

int parse_args (int &argc, ACE_TCHAR *argv[])
 Parses and pulls out arguments for the ImR. More...
 
void print_usage (void) const
 Print the usage information. More...
 
int run_service_command (const ACE_TString &cmdline)
 Run a service command. More...
 
int load_registry_options ()
 

Private Attributes

RepoMode repo_mode_
 xml, heap, or registry More...
 
bool erase_repo_
 Do we clear out the repository on load. More...
 
unsigned int debug_
 Debug level. More...
 
ACE_TString ior_output_file_
 File where the IOR of the server object is stored. More...
 
bool multicast_
 Will we listen for multicast location requests? More...
 
bool service_
 Are we running as a service? More...
 
bool ping_external_
 Should the ImR ping servers not started using the ImR? More...
 
ACE_Time_Value ping_interval_
 The amount of time between successive "are you started yet?" pings. More...
 
ACE_Time_Value ping_timeout_
 The amount of time to wait for a "are you started yet?" ping reply. More...
 
ACE_Time_Value startup_timeout_
 The amount of time to wait for a server to response after starting it. More...
 
bool readonly_
 Can the server_repository be modified? More...
 
SERVICE_COMMAND service_command_
 SC_NONE, SC_INSTALL, SC_REMOVE, ... More...
 
ACE_CString cmdline_
 Our extra command line arguments. More...
 
ACE_TString persist_file_name_
 The persistent XML file name. More...
 
bool unregister_if_address_reused_
 
bool lockout_
 
ImrType imr_type_
 The type of ImR Locator this is. More...
 
bool throw_shutdown_exceptions_
 
LiveCheckpinger_
 
int threads_
 
ACE_CString ft_endpoint_
 
ACE_Time_Value ft_update_delay_
 

Detailed Description

Maintains the global options.

This is where all the settings for TAO's Implementation Repository are stored.

This is where the settings for TAO's Implementation Repository are stored.

Member Enumeration Documentation

Indicate what type of ImR Locator this is.

Enumerator
BACKUP_IMR 
PRIMARY_IMR 
STANDALONE_IMR 

Which type of repository is to be used?

Enumerator
REPO_NONE 
REPO_XML_FILE 
REPO_SHARED_FILES 
REPO_HEAP_FILE 
REPO_REGISTRY 
Enumerator
SC_NONE 
SC_INSTALL 
SC_REMOVE 

Constructor & Destructor Documentation

Options::Options ( )

Member Function Documentation

const char * Options::cmdline ( void  ) const
unsigned int Options::debug ( void  ) const

Debug level for the Implementation Repository.

const ACE_CString & Options::ft_endpoint ( void  ) const
ACE_Time_Value Options::ft_update_delay ( void  ) const
Options::ImrType Options::imr_type ( void  ) const
int Options::init ( int  argc,
ACE_TCHAR argv[] 
)

Parse the command-line arguments and initialize the options.

int Options::init_from_registry ( void  )

This version should only be used when run as an nt service.

const ACE_TString & Options::ior_filename ( void  ) const

Returns the file where the IOR should be stored.

int Options::load_registry_options ( )
private
bool Options::lockout ( void  ) const
bool Options::multicast ( void  ) const

Will we listen for multicast location requests?

int Options::parse_args ( int &  argc,
ACE_TCHAR argv[] 
)
private

Parses and pulls out arguments for the ImR.

const ACE_TString & Options::persist_file_name ( void  ) const

File that contains the activator related information that the persistent locator has to save.

bool Options::ping_external ( void  ) const

Servers may be started externally to the ImR but register with it so that clients may still be forwarded to it. Traditionally, such servers are not pinged by the ImR in the spirit that since its own means were used to activate the service, the ImR should let the client deal with the server no matter the consequences. However, the ImR is in a position to give more information to the client or lists of active servers, so enabling the ping_external_ option will override the assumption of liveness and actively ping, based on the existing rules, all registered servers.

ACE_Time_Value Options::ping_interval ( void  ) const

If the server hasn't been verified for a while, then we'll ping it. Note : No timers are currently used. We simply ping() during indirect invocations, if this interval has elapsed.

ACE_Time_Value Options::ping_timeout ( void  ) const

When pinging, this is the timeout.

LiveCheck * Options::pinger ( void  ) const
void Options::pinger ( LiveCheck p)
void Options::print_usage ( void  ) const
private

Print the usage information.

bool Options::readonly ( void  ) const

Do we allow modifications to the servers?

bool Options::repository_erase ( void  ) const

Do we wish to clear out the repository.

Options::RepoMode Options::repository_mode ( void  ) const
int Options::run_service_command ( const ACE_TString cmdline)
private

Run a service command.

int Options::save_registry_options ( )
bool Options::service ( void  ) const

Service Mode.

Options::SERVICE_COMMAND Options::service_command ( void  ) const

The nt service command to run (install/remove)

ACE_Time_Value Options::startup_timeout ( void  ) const

Returns the timeout value for program starting.

int Options::threads ( void  ) const
bool Options::throw_shutdown_exceptions ( void  ) const
bool Options::unregister_if_address_reused ( void  ) const

Member Data Documentation

ACE_CString Options::cmdline_
private

Our extra command line arguments.

unsigned int Options::debug_
private

Debug level.

bool Options::erase_repo_
private

Do we clear out the repository on load.

ACE_CString Options::ft_endpoint_
private
ACE_Time_Value Options::ft_update_delay_
private
ImrType Options::imr_type_
private

The type of ImR Locator this is.

ACE_TString Options::ior_output_file_
private

File where the IOR of the server object is stored.

bool Options::lockout_
private

If enabled, use a global start count and lock access to the server without user intervention. Otherwise start count is reset for every start request

bool Options::multicast_
private

Will we listen for multicast location requests?

ACE_TString Options::persist_file_name_
private

The persistent XML file name.

bool Options::ping_external_
private

Should the ImR ping servers not started using the ImR?

ACE_Time_Value Options::ping_interval_
private

The amount of time between successive "are you started yet?" pings.

ACE_Time_Value Options::ping_timeout_
private

The amount of time to wait for a "are you started yet?" ping reply.

LiveCheck* Options::pinger_
private
bool Options::readonly_
private

Can the server_repository be modified?

RepoMode Options::repo_mode_
private

xml, heap, or registry

bool Options::service_
private

Are we running as a service?

SERVICE_COMMAND Options::service_command_
private

SC_NONE, SC_INSTALL, SC_REMOVE, ...

ACE_Time_Value Options::startup_timeout_
private

The amount of time to wait for a server to response after starting it.

int Options::threads_
private
bool Options::throw_shutdown_exceptions_
private

Have the "shutdown_server" command forward any exceptions (such as transient) back to the caller. Default behavior is to not do that since doing so may break existing installations. There is no command line option for this yet, but I want to preserve the framework for future use.

bool Options::unregister_if_address_reused_
private

Should check the server address and remove previous server if the address is reused.


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