#include <Server_Info.h>
Collaboration diagram for Server_Info:
Public Member Functions | |
Server_Info (const ACE_CString &server_name, const ACE_CString &aname, const ACE_CString &cmdline, const ImplementationRepository::EnvironmentList &env, const ACE_CString &working_dir, ImplementationRepository::ActivationMode amode, int start_limit, const ACE_CString &partial_ior=ACE_CString(""), const ACE_CString &server_ior=ACE_CString(""), ImplementationRepository::ServerObject_ptr svrobj=ImplementationRepository::ServerObject::_nil()) | |
ImplementationRepository::ServerInformation * | createImRServerInfo (void) |
Convert to the corba type. | |
void | reset () |
Public Attributes | |
ACE_CString | name |
The name of the server. | |
ACE_CString | activator |
The name of the activator in which this server runs. | |
ACE_CString | cmdline |
The command line startup command (program and arguments). | |
ImplementationRepository::EnvironmentList | env_vars |
Environment Variables. | |
ACE_CString | dir |
The working directory. | |
ImplementationRepository::ActivationMode | activation_mode |
The type of activation this supports. | |
int | start_limit |
Limit of retries to start the server. | |
ACE_CString | partial_ior |
Current endpoint used by the server. | |
ACE_CString | ior |
IOR of the server object in the server. | |
ACE_Time_Value | last_ping |
The timestamp of the last time we verified the server is alive. | |
ImplementationRepository::ServerObject_var | server |
The cached server object. | |
int | start_count |
int | waiting_clients |
bool | starting |
Definition at line 29 of file Server_Info.h.
Server_Info::Server_Info | ( | const ACE_CString & | server_name, | |
const ACE_CString & | aname, | |||
const ACE_CString & | cmdline, | |||
const ImplementationRepository::EnvironmentList & | env, | |||
const ACE_CString & | working_dir, | |||
ImplementationRepository::ActivationMode | amode, | |||
int | start_limit, | |||
const ACE_CString & | partial_ior = ACE_CString("") , |
|||
const ACE_CString & | server_ior = ACE_CString("") , |
|||
ImplementationRepository::ServerObject_ptr | svrobj = ImplementationRepository::ServerObject::_nil() | |||
) |
Definition at line 5 of file Server_Info.cpp.
00017 : name (server_name) 00018 , activator (aname) 00019 , cmdline( cmdline) 00020 , env_vars (env) 00021 , dir (working_dir) 00022 , activation_mode (amode) 00023 , start_limit (limit) 00024 , partial_ior (partial_ior) 00025 , ior (server_ior) 00026 , server(ImplementationRepository::ServerObject::_duplicate (svrobj)) 00027 , start_count (0) 00028 , waiting_clients (0) 00029 , starting (false) 00030 { 00031 }
ImplementationRepository::ServerInformation * Server_Info::createImRServerInfo | ( | void | ) |
Convert to the corba type.
Definition at line 34 of file Server_Info.cpp.
References ACE_NEW_THROW_EX, activation_mode, activator, ACE_String_Base< CHAR >::c_str(), cmdline, dir, env_vars, name, partial_ior, start_count, and start_limit.
00035 { 00036 ImplementationRepository::ServerInformation* info; 00037 ACE_NEW_THROW_EX (info, ImplementationRepository::ServerInformation, CORBA::NO_MEMORY ()); 00038 00039 info->server = name.c_str (); 00040 info->startup.command_line = cmdline.c_str (); 00041 info->startup.environment = env_vars; 00042 info->startup.working_directory = dir.c_str (); 00043 info->startup.activation = activation_mode; 00044 info->startup.activator = activator.c_str (); 00045 if (start_count >= start_limit) 00046 { 00047 info->startup.start_limit = -start_limit; 00048 } 00049 else 00050 { 00051 info->startup.start_limit = start_limit; 00052 } 00053 info->partial_ior = partial_ior.c_str(); 00054 00055 return info; 00056 }
void Server_Info::reset | ( | ) |
Definition at line 59 of file Server_Info.cpp.
References ior, last_ping, partial_ior, server, and ACE_Time_Value::zero.
Referenced by ImR_Locator_i::connect_server(), and ImR_Locator_i::start_server().
00060 { 00061 ior = ""; 00062 partial_ior = ""; 00063 last_ping = ACE_Time_Value::zero; 00064 server = ImplementationRepository::ServerObject::_nil (); 00065 // start_count = 0; Note : We can't do this, because it would be reset during startup. 00066 }
ImplementationRepository::ActivationMode Server_Info::activation_mode |
The type of activation this supports.
Definition at line 59 of file Server_Info.h.
Referenced by ImR_Locator_i::activate_server_i(), createImRServerInfo(), ImR_Locator_i::start_server(), and Locator_Repository::update_server().
The name of the activator in which this server runs.
Definition at line 51 of file Server_Info.h.
Referenced by createImRServerInfo(), ImR_Locator_i::is_alive_i(), ImR_Locator_i::start_server(), and Locator_Repository::update_server().
The command line startup command (program and arguments).
Definition at line 53 of file Server_Info.h.
Referenced by createImRServerInfo(), ImR_Locator_i::is_alive_i(), ImR_Locator_i::start_server(), and Locator_Repository::update_server().
The working directory.
Definition at line 57 of file Server_Info.h.
Referenced by createImRServerInfo(), ImR_Locator_i::start_server(), and Locator_Repository::update_server().
ImplementationRepository::EnvironmentList Server_Info::env_vars |
Environment Variables.
Definition at line 55 of file Server_Info.h.
Referenced by createImRServerInfo(), ImR_Locator_i::start_server(), and Locator_Repository::update_server().
IOR of the server object in the server.
Definition at line 65 of file Server_Info.h.
Referenced by ImR_Locator_i::activate_perclient_server_i(), ImR_Locator_i::connect_server(), ImR_Locator_i::is_alive_i(), reset(), and Locator_Repository::update_server().
The timestamp of the last time we verified the server is alive.
Definition at line 67 of file Server_Info.h.
Referenced by ImR_Locator_i::is_alive(), ImR_Locator_i::is_alive_i(), and reset().
The name of the server.
Definition at line 49 of file Server_Info.h.
Referenced by ImR_Locator_i::activate_perclient_server_i(), ImR_Locator_i::connect_server(), createImRServerInfo(), ImR_Locator_i::is_alive(), ImR_Locator_i::is_alive_i(), ImR_Locator_i::start_server(), and Locator_Repository::update_server().
Current endpoint used by the server.
Definition at line 63 of file Server_Info.h.
Referenced by ImR_Locator_i::activate_perclient_server_i(), createImRServerInfo(), ImR_Locator_i::is_alive_i(), reset(), ImR_Locator_i::start_server(), and Locator_Repository::update_server().
ImplementationRepository::ServerObject_var Server_Info::server |
The cached server object.
Definition at line 69 of file Server_Info.h.
Referenced by ImR_Locator_i::connect_server(), ImR_Locator_i::is_alive_i(), and reset().
Definition at line 70 of file Server_Info.h.
Referenced by ImR_Locator_i::activate_perclient_server_i(), createImRServerInfo(), and ImR_Locator_i::start_server().
Limit of retries to start the server.
Definition at line 61 of file Server_Info.h.
Referenced by ImR_Locator_i::activate_perclient_server_i(), createImRServerInfo(), ImR_Locator_i::start_server(), and Locator_Repository::update_server().
Definition at line 71 of file Server_Info.h.