diff options
author | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-07-24 15:50:21 +0000 |
---|---|---|
committer | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-07-24 15:50:21 +0000 |
commit | 3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c (patch) | |
tree | 197c810e5f5bce17b1233a7cb8d7b50c0bcd25e2 /TAO/orbsvcs/ImplRepo_Service/Server_Info.cpp | |
parent | 6b846cf03c0bcbd8c276cb0af61a181e5f98eaae (diff) | |
download | ATCD-3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c.tar.gz |
Repo restructuring
Diffstat (limited to 'TAO/orbsvcs/ImplRepo_Service/Server_Info.cpp')
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/Server_Info.cpp | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/TAO/orbsvcs/ImplRepo_Service/Server_Info.cpp b/TAO/orbsvcs/ImplRepo_Service/Server_Info.cpp new file mode 100644 index 00000000000..91f8d7fa1be --- /dev/null +++ b/TAO/orbsvcs/ImplRepo_Service/Server_Info.cpp @@ -0,0 +1,66 @@ +// $Id$ +#include "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 limit, + const ACE_CString& partial_ior, + const ACE_CString& server_ior, + ImplementationRepository::ServerObject_ptr svrobj + ) + : name (server_name) + , activator (aname) + , cmdline( cmdline) + , env_vars (env) + , dir (working_dir) + , activation_mode (amode) + , start_limit (limit) + , partial_ior (partial_ior) + , ior (server_ior) + , server(ImplementationRepository::ServerObject::_duplicate (svrobj)) + , start_count (0) + , waiting_clients (0) + , starting (false) +{ +} + +ImplementationRepository::ServerInformation* +Server_Info::createImRServerInfo (ACE_ENV_SINGLE_ARG_DECL) +{ + ImplementationRepository::ServerInformation* info; + ACE_NEW_THROW_EX (info, ImplementationRepository::ServerInformation, CORBA::NO_MEMORY ()); + + info->server = name.c_str (); + info->startup.command_line = cmdline.c_str (); + info->startup.environment = env_vars; + info->startup.working_directory = dir.c_str (); + info->startup.activation = activation_mode; + info->startup.activator = activator.c_str (); + if (start_count >= start_limit) + { + info->startup.start_limit = -start_limit; + } + else + { + info->startup.start_limit = start_limit; + } + info->partial_ior = partial_ior.c_str(); + + return info; +} + +void +Server_Info::reset (void) +{ + ior = ""; + partial_ior = ""; + last_ping = ACE_Time_Value::zero; + server = ImplementationRepository::ServerObject::_nil (); + // start_count = 0; Note : We can't do this, because it would be reset during startup. +} |