summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Log
diff options
context:
space:
mode:
authorWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:11 +0000
committerWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:11 +0000
commit6b846cf03c0bcbd8c276cb0af61a181e5f98eaae (patch)
treeda50d054f9c761c3f6a5923f6979e93306c56d68 /TAO/orbsvcs/orbsvcs/Log
parent0e555b9150d38e3b3473ba325b56db2642e6352b (diff)
downloadATCD-6b846cf03c0bcbd8c276cb0af61a181e5f98eaae.tar.gz
Repo restructuring
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Log')
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/BasicLogFactory_i.cpp147
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/BasicLogFactory_i.h109
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/BasicLog_i.cpp93
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/BasicLog_i.h101
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/EventLogConsumer.cpp100
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/EventLogConsumer.h102
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/EventLogFactory_i.cpp253
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/EventLogFactory_i.h152
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/EventLogNotification.cpp52
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/EventLogNotification.h92
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/EventLog_i.cpp139
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/EventLog_i.h135
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/Hash_Iterator_i.cpp110
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/Hash_Iterator_i.h95
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/Hash_LogRecordStore.cpp832
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/Hash_LogRecordStore.h399
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/Hash_LogStore.cpp269
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/Hash_LogStore.h130
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/Hash_Persistence_Strategy.cpp25
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/Hash_Persistence_Strategy.h59
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/Iterator_i.cpp73
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/Iterator_i.h91
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/LogActivator.cpp58
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/LogActivator.h78
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/LogMgr_i.cpp296
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/LogMgr_i.h202
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/LogNotification.cpp418
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/LogNotification.h185
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/LogRecordStore.cpp17
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/LogRecordStore.h269
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/LogStore.h108
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/Log_Compaction_Handler.cpp66
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/Log_Compaction_Handler.h66
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Interpreter.cpp49
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Interpreter.h70
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Visitors.cpp1347
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Visitors.h130
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/Log_Flush_Handler.cpp59
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/Log_Flush_Handler.h66
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/Log_Persistence_Strategy.h61
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/Log_i.cpp1859
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/Log_i.h509
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/NotifyLogConsumer.cpp144
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/NotifyLogConsumer.h117
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/NotifyLogFactory_i.cpp462
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/NotifyLogFactory_i.h281
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/NotifyLogNotification.cpp88
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/NotifyLogNotification.h108
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/NotifyLog_i.cpp371
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/NotifyLog_i.h240
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/RTEventLogConsumer.cpp68
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/RTEventLogConsumer.h95
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/RTEventLogFactory_i.cpp242
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/RTEventLogFactory_i.h141
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/RTEventLogNotification.cpp90
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/RTEventLogNotification.h93
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/RTEventLog_i.cpp166
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/RTEventLog_i.h138
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/eventlog_export.h37
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/eventlog_serv_export.h37
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/eventlog_skel_export.h37
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/log_export.h39
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/log_serv_export.h39
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/log_skel_export.h41
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/notifylog_export.h37
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/notifylog_serv_export.h37
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/notifylog_skel_export.h37
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/rteventlog_export.h37
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/rteventlog_serv_export.h37
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/rteventlog_skel_export.h37
70 files changed, 0 insertions, 12767 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Log/BasicLogFactory_i.cpp b/TAO/orbsvcs/orbsvcs/Log/BasicLogFactory_i.cpp
deleted file mode 100644
index b8704fe0988..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/BasicLogFactory_i.cpp
+++ /dev/null
@@ -1,147 +0,0 @@
-#include "orbsvcs/Log/BasicLogFactory_i.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (Log,
- BasicLogFactory_i,
- "$Id$")
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-TAO_BasicLogFactory_i::TAO_BasicLogFactory_i (void)
-{
-}
-
-TAO_BasicLogFactory_i::~TAO_BasicLogFactory_i (void)
-{
-}
-
-DsLogAdmin::BasicLogFactory_ptr
-TAO_BasicLogFactory_i::activate (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa
- ACE_ENV_ARG_DECL)
-{
- TAO_LogMgr_i::init (orb, poa ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::BasicLogFactory::_nil ());
-
-
- PortableServer::ObjectId_var oid =
- this->factory_poa_->activate_object (this
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::BasicLogFactory::_nil ());
-
- CORBA::Object_var obj =
- this->factory_poa_->id_to_reference (oid.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::BasicLogFactory::_nil ());
-
- // narrow and store the result..
- this->log_mgr_ =
- DsLogAdmin::LogMgr::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::BasicLogFactory::_nil ());
-
- DsLogAdmin::BasicLogFactory_var v_return =
- DsLogAdmin::BasicLogFactory::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::BasicLogFactory::_nil ());
-
- return v_return._retn ();
-}
-
-DsLogAdmin::BasicLog_ptr
-TAO_BasicLogFactory_i::create (DsLogAdmin::LogFullActionType full_action,
- CORBA::ULongLong max_size,
- DsLogAdmin::LogId_out id_out
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidLogFullAction
- ))
-{
- this->create_i (full_action,
- max_size,
- 0,
- id_out
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::BasicLog::_nil ());
- DsLogAdmin::LogId id = id_out;
-
-#if (TAO_HAS_MINIMUM_POA == 0)
- DsLogAdmin::Log_var log =
- this->create_log_reference (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::BasicLog::_nil ());
-#else
- DsLogAdmin::Log_var log =
- this->create_log_object (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::BasicLog::_nil ());
-#endif
-
- // narrow to BasicLog
- DsLogAdmin::BasicLog_var basic_log =
- DsLogAdmin::BasicLog::_narrow (log.in ());
-
- return basic_log._retn ();
-}
-
-DsLogAdmin::BasicLog_ptr
-TAO_BasicLogFactory_i::create_with_id (DsLogAdmin::LogId id,
- DsLogAdmin::LogFullActionType full_action,
- CORBA::ULongLong max_size
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- DsLogAdmin::LogIdAlreadyExists,
- DsLogAdmin::InvalidLogFullAction
- ))
-{
- this->create_with_id_i (id,
- full_action,
- max_size,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::BasicLog::_nil ());
-
-#if (TAO_HAS_MINIMUM_POA == 0)
- DsLogAdmin::Log_var log =
- this->create_log_reference (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::BasicLog::_nil ());
-#else
- DsLogAdmin::Log_var log =
- this->create_log_object (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::BasicLog::_nil ());
-#endif
-
- // narrow to BasicLog
- DsLogAdmin::BasicLog_var basic_log =
- DsLogAdmin::BasicLog::_narrow (log.in ());
-
- return basic_log._retn ();
-}
-
-CORBA::RepositoryId
-TAO_BasicLogFactory_i::create_repositoryid ()
-{
- return CORBA::string_dup ("IDL:omg.org/DsLogAdmin:BasicLog:1.0");
-}
-
-PortableServer::ServantBase*
-TAO_BasicLogFactory_i::create_log_servant (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL)
-{
- TAO_BasicLog_i* basic_log_i;
-
- ACE_NEW_THROW_EX (basic_log_i,
- TAO_BasicLog_i (this->orb_.in (),
- this->log_poa_.in (),
- *this,
- this->log_mgr_.in (),
- id),
- CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (0);
-
- basic_log_i->init (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- return basic_log_i;
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/orbsvcs/orbsvcs/Log/BasicLogFactory_i.h b/TAO/orbsvcs/orbsvcs/Log/BasicLogFactory_i.h
deleted file mode 100644
index f6cc8f4113a..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/BasicLogFactory_i.h
+++ /dev/null
@@ -1,109 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file BasicLogFactory_i.h
- *
- * $Id$
- *
- * Implementation of the DsLogAdmin::BasicLogFactory interface.
- *
- *
- * @author Matthew Braun <mjb2@cs.wustl.edu>
- * @author Pradeep Gore <pradeep@cs.wustl.edu>
- * @author David A. Hanvey <d.hanvey@qub.ac.uk>
- */
-//=============================================================================
-
-#ifndef TAO_TLS_BASICLOGFACTORY_I_H
-#define TAO_TLS_BASICLOGFACTORY_I_H
-#include /**/ "ace/pre.h"
-
-#include "orbsvcs/DsLogAdminS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "orbsvcs/Log/LogMgr_i.h"
-#include "orbsvcs/Log/BasicLog_i.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-class TAO_BasicLogActivator;
-
-/**
- * @class TAO_BasicLogFactory_i
- *
- * @brief The BasicLogFactory is a factory that is used to create event-unaware Logs.
- */
-class TAO_Log_Serv_Export TAO_BasicLogFactory_i :
- public POA_DsLogAdmin::BasicLogFactory,
- public TAO_LogMgr_i
-{
-public:
-
- //= Initialization and termination code.
-
- /// Constructor.
- TAO_BasicLogFactory_i ();
-
- /// Destructor.
- ~TAO_BasicLogFactory_i ();
-
- /// Activate this servant with the ORB and POA passed in.
- DsLogAdmin::BasicLogFactory_ptr
- activate (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa
- ACE_ENV_ARG_DECL);
-
- /// Allows clients to create new BasicLog objects.
- /// Raises DsLogAdmin::InvalidThreshold.
- DsLogAdmin::BasicLog_ptr
- create (DsLogAdmin::LogFullActionType full_action,
- CORBA::ULongLong max_size,
- DsLogAdmin::LogId_out id
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidLogFullAction
- ));
-
- /// Same as create (), but allows clients to specify the id.
- DsLogAdmin::BasicLog_ptr
- create_with_id (DsLogAdmin::LogId id,
- DsLogAdmin::LogFullActionType full_action,
- CORBA::ULongLong max_size
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- DsLogAdmin::LogIdAlreadyExists,
- DsLogAdmin::InvalidLogFullAction
- ));
-
-protected:
- virtual CORBA::RepositoryId
- create_repositoryid ();
-
- virtual PortableServer::ServantBase*
- create_log_servant (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL);
-
- /// Our object ref. after <active>ation.
- DsLogAdmin::LogMgr_var log_mgr_;
-};
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_TLS_BASICLOGFACTORY_I_H */
diff --git a/TAO/orbsvcs/orbsvcs/Log/BasicLog_i.cpp b/TAO/orbsvcs/orbsvcs/Log/BasicLog_i.cpp
deleted file mode 100644
index fa4c1f0af22..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/BasicLog_i.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-#include "orbsvcs/Log/BasicLog_i.h"
-
-#include "orbsvcs/Log/LogMgr_i.h"
-
-ACE_RCSID (Log,
- BasicLog_i,
- "$Id$")
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-TAO_BasicLog_i::TAO_BasicLog_i (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- TAO_LogMgr_i &logmgr_i,
- DsLogAdmin::LogMgr_ptr factory,
- DsLogAdmin::LogId id)
- : TAO_Log_i (orb, logmgr_i, factory, id, 0),
- poa_(PortableServer::POA::_duplicate(poa))
-{
- // No-Op.
-}
-
-TAO_BasicLog_i::~TAO_BasicLog_i (void)
-{
- // No-Op.
-}
-
-DsLogAdmin::Log_ptr
-TAO_BasicLog_i::copy (DsLogAdmin::LogId &id
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- DsLogAdmin::BasicLogFactory_var basicLogFactory =
- DsLogAdmin::BasicLogFactory::_narrow (factory_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::Log::_nil ());
-
- DsLogAdmin::BasicLog_var log =
- basicLogFactory->create (DsLogAdmin::halt, 0, id
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::Log::_nil ());
-
-
- // Copy the attributes from the log.
- this->copy_attributes (log.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::Log::_nil ());
-
- return log._retn ();
-
-}
-
-DsLogAdmin::Log_ptr
-TAO_BasicLog_i::copy_with_id (DsLogAdmin::LogId id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- DsLogAdmin::BasicLogFactory_var basicLogFactory =
- DsLogAdmin::BasicLogFactory::_narrow (factory_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::Log::_nil ());
-
- DsLogAdmin::BasicLog_var log =
- basicLogFactory->create_with_id (id, DsLogAdmin::halt, 0
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::Log::_nil ());
-
- // Copy the attributes from the log.
- this->copy_attributes (log.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::Log::_nil ());
-
- return log._retn ();
-
-}
-
-void
-TAO_BasicLog_i::destroy (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Remove ourselves from the list of logs.
- this->logmgr_i_.remove (this->logid_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Deregister with POA.
- PortableServer::ObjectId_var id =
- this->poa_->servant_to_id (this
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->poa_->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/orbsvcs/orbsvcs/Log/BasicLog_i.h b/TAO/orbsvcs/orbsvcs/Log/BasicLog_i.h
deleted file mode 100644
index e1a51484192..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/BasicLog_i.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/* -*- C++ -*- */
-
-//=============================================================================
-/**
- * @file BasicLog_i.h
- *
- * $Id$
- *
- * Implementation of the DsLogAdmin::BasicLog interface.
- *
- *
- * @author Matthew Braun <mjb2@cs.wustl.edu>
- * @author Pradeep Gore <pradeep@cs.wustl.edu>
- * @David A. Hanvey <d.hanvey@qub.ac.uk>
- */
-//=============================================================================
-
-
-#ifndef TAO_TLS_BASICLOG_I_H
-#define TAO_TLS_BASICLOG_I_H
-
-#include /**/ "ace/pre.h"
-
-#include "orbsvcs/DsLogAdminS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "orbsvcs/Log/Log_i.h"
-#include "orbsvcs/Log/log_serv_export.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-class TAO_LogMgr_i;
-
-/**
- * @class TAO_BasicLog_i
- *
- * @brief It allows clients to write, query and delete records from the log.
- *
- * The class supports the @c destroy> method to destroy the Log.
- */
-class TAO_Log_Serv_Export TAO_BasicLog_i :
- public TAO_Log_i,
- public POA_DsLogAdmin::BasicLog
-{
-public:
-
- /// Constructor.
- TAO_BasicLog_i (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- TAO_LogMgr_i &logmgr_i,
- DsLogAdmin::LogMgr_ptr factory,
- DsLogAdmin::LogId id);
-
- /// Duplicate the log.
- virtual DsLogAdmin::Log_ptr copy (DsLogAdmin::LogId &id
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Duplicate the log specifying an id.
- virtual DsLogAdmin::Log_ptr copy_with_id (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Destroy the log object and all contained records.
- void destroy (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-protected:
-
- /// Destructor.
- /**
- * Protected destructor to enforce proper memory management through
- * reference counting.
- */
- ~TAO_BasicLog_i (void);
-
-private:
-
- /// POA.
- PortableServer::POA_var poa_;
-};
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-
-#endif /* TAO_TLS_BASICLOG_I_H */
diff --git a/TAO/orbsvcs/orbsvcs/Log/EventLogConsumer.cpp b/TAO/orbsvcs/orbsvcs/Log/EventLogConsumer.cpp
deleted file mode 100644
index 5e005ee70c6..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/EventLogConsumer.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-#include "orbsvcs/Log/EventLog_i.h"
-#include "orbsvcs/Log/LogMgr_i.h"
-#include "orbsvcs/Log/LogNotification.h"
-
-ACE_RCSID (Log,
- EventLogConsumer,
- "$Id$")
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-TAO_Event_LogConsumer::TAO_Event_LogConsumer (TAO_EventLog_i *log)
-: log_ (log)
-{
-}
-
-TAO_Event_LogConsumer::~TAO_Event_LogConsumer (void)
-{
-}
-
-void
-TAO_Event_LogConsumer::connect (CosEventChannelAdmin::ConsumerAdmin_ptr consumer_admin)
-{
- // Connect to the event channel.
- CosEventComm::PushConsumer_var myself = this->_this ();
- this->supplier_proxy_ = consumer_admin->obtain_push_supplier ();
- this->supplier_proxy_->connect_push_consumer (myself.in());
-}
-
-void
-TAO_Event_LogConsumer::push (const CORBA::Any& data ACE_ENV_ARG_DECL)
-ACE_THROW_SPEC ((
- CORBA::SystemException,
- CosEventComm::Disconnected
- ))
-{
- // create a record list...
- DsLogAdmin::RecordList recList (1);
- recList.length (1);
-
- recList [0].info = data;
-
- // @@ The current revision of the specification (formal/03-07-01)
- // states:
- //
- // * When a push operation is invoked and a log is full, then a
- // NO_RESOURCE (sic) SystemException is raised with a LOGFULL
- // minor code.
- //
- // * When a push operation is invoked on a log that is off-duty,
- // then a NO_RESOURCE (sic) SystemException is raised with a
- // LOGOFFDUTY minor code.
- //
- // * When a push operation is invoked on a log that is locked, then
- // a NO_PERMISSIONS (sic) SystemException is raised with a LOGLOCKED
- // minor code.
- //
- // * When a push operation is invoked on a log that is disabled,
- // then a TRANSIENT SystemException is raised with a LOGDISABLED
- // minor code.
- //
- // But neither the Telecom Logging or the CORBA specification define
- // the values for these minor codes.
- //
- // I have submitted a defect report to the OMG for clarification.
- // --jtc
- ACE_TRY
- {
- // log the RecordList.
- this->log_->write_recordlist (recList ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (DsLogAdmin::LogFull, ex)
- {
- ACE_THROW (CORBA::NO_RESOURCES ());
- }
- ACE_CATCH (DsLogAdmin::LogOffDuty, ex)
- {
- ACE_THROW (CORBA::NO_RESOURCES ());
- }
- ACE_CATCH (DsLogAdmin::LogLocked, ex)
- {
- ACE_THROW (CORBA::NO_PERMISSION ());
- }
- ACE_CATCH (DsLogAdmin::LogDisabled, ex)
- {
- ACE_THROW (CORBA::TRANSIENT ());
- }
- ACE_ENDTRY;
-}
-
-void
-TAO_Event_LogConsumer::disconnect_push_consumer (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- this->supplier_proxy_->disconnect_push_supplier (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/orbsvcs/orbsvcs/Log/EventLogConsumer.h b/TAO/orbsvcs/orbsvcs/Log/EventLogConsumer.h
deleted file mode 100644
index fac7eb9bbb9..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/EventLogConsumer.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* -*- C++ -*- */
-
-// ============================================================================
-/**
- * @file EventLogConsumer.h
- *
- * $Id$
- *
- * The EventLogConsumer connects to the EventLog and logs the events
- * that are pushed to the EventLog.
- *
- * @author Rob Ruff <rruff@scires.com>
- * @D A Hanvey <d.hanvey@qub.ac.uk>
- */
-// ============================================================================
-
-#ifndef TAO_TLS_EVENTLOGCONSUMER_H
-#define TAO_TLS_EVENTLOGCONSUMER_H
-
-#include /**/ "ace/pre.h"
-
-#include "orbsvcs/DsLogAdminS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-
-#include "orbsvcs/DsEventLogAdminS.h"
-#include "orbsvcs/Log/Log_i.h"
-#include "orbsvcs/CosEvent/CEC_EventChannel.h"
-
-#include "orbsvcs/Log/eventlog_serv_export.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-class TAO_LogMgr_i;
-class TAO_EventLog_i;
-class TAO_EventLogFactory_i;
-
-/**
- * @class TAO_Event_LogConsumer
- *
- * @brief An implementation of the PushConsumer interface.
- *
- * Connects to the EventLog and writes LogRecords to the
- * Log when events are 'pushed' to the EventLog which is an
- * EventChannel.
- */
-class TAO_Event_LogConsumer : public virtual POA_CosEventComm::PushConsumer
-{
-public:
-
- // = Initialization and Termination methods.
-
- /// Constructor.
- TAO_Event_LogConsumer (TAO_EventLog_i *log);
-
- /// Destructor.
- ~TAO_Event_LogConsumer (void);
-
- /// Connect to EventLog.
- void
- connect (CosEventChannelAdmin::ConsumerAdmin_ptr consumer_admin);
-
-private:
-
- /// Disconnect from EventLog.
- void disconnect_push_consumer (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- /// This method will call TAO_Log_i::log() to write
- /// the event to the Log.
- void push (const CORBA::Any& data ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- CosEventComm::Disconnected
- ));
-
- /// ProxyPushSupplier used to connect to EventLog.
- CosEventChannelAdmin::ProxyPushSupplier_var supplier_proxy_;
-
- /// The EventLog that this consumer connects to
- /// and whose events are to be logged.
- TAO_EventLog_i *log_;
-};
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_TLS_EVENTLOGCONSUMER_H */
diff --git a/TAO/orbsvcs/orbsvcs/Log/EventLogFactory_i.cpp b/TAO/orbsvcs/orbsvcs/Log/EventLogFactory_i.cpp
deleted file mode 100644
index 901af607cc1..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/EventLogFactory_i.cpp
+++ /dev/null
@@ -1,253 +0,0 @@
-#include "orbsvcs/Log/EventLogFactory_i.h"
-#include "orbsvcs/Log/LogNotification.h"
-#include "orbsvcs/Log/EventLogNotification.h"
-#include "ace/Auto_Ptr.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (Log,
- EventLogFactory_i,
- "$Id$")
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-TAO_EventLogFactory_i::TAO_EventLogFactory_i (void)
-{
- TAO_CEC_Default_Factory::init_svcs ();
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- PortableServer::POA_var defPOA =
- this->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TAO_CEC_EventChannel_Attributes attr (defPOA.in (), defPOA.in ());
-
- ACE_NEW_THROW_EX (impl,
- TAO_CEC_EventChannel (attr),
- CORBA::NO_MEMORY ());
- ACE_TRY_CHECK;
-
- impl->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception in "
- "EventLogFactory_i constructor.");
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
-
-TAO_EventLogFactory_i::~TAO_EventLogFactory_i (void)
-{
- // No-Op.
-}
-
-CosEventChannelAdmin::EventChannel_ptr
-TAO_EventLogFactory_i::init (PortableServer::POA_ptr /* poa */
- ACE_ENV_ARG_DECL)
-{
- ACE_ASSERT (!CORBA::is_nil (this->poa_.in ()));
-
- CosEventChannelAdmin::EventChannel_var ec_return;
-
- auto_ptr <TAO_CEC_EventChannel> ec (impl);
-
- PortableServer::ObjectId_var oid =
- this->poa_->activate_object (ec.get ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CosEventChannelAdmin::EventChannel::_nil ());
-
- ec.release ();
-
- CORBA::Object_var obj =
- this->poa_->id_to_reference (oid.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CosEventChannelAdmin::EventChannel::_nil ());
-
- ec_return =
- CosEventChannelAdmin::EventChannel::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CosEventChannelAdmin::EventChannel::_nil ());
-
- return ec_return._retn ();
-}
-
-DsEventLogAdmin::EventLogFactory_ptr
-TAO_EventLogFactory_i::activate (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa
- ACE_ENV_ARG_DECL)
-{
- TAO_LogMgr_i::init (orb, poa ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsEventLogAdmin::EventLogFactory::_nil ());
-
-
- this->event_channel_ = init (this->poa_.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsEventLogAdmin::EventLogFactory::_nil ());
-
- this->consumer_admin_ =
- this->event_channel_->for_consumers (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsEventLogAdmin::EventLogFactory::_nil ());
-
- ACE_NEW_THROW_EX (this->notifier_,
- TAO_EventLogNotification(this->event_channel_.in ()),
- CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (DsEventLogAdmin::EventLogFactory::_nil ());
-
- PortableServer::ObjectId_var oid =
- this->factory_poa_->activate_object (this
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsEventLogAdmin::EventLogFactory::_nil ());
-
- CORBA::Object_var obj =
- this->factory_poa_->id_to_reference (oid.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsEventLogAdmin::EventLogFactory::_nil ());
-
- // narrow and store the result..
- this->log_mgr_ =
- DsLogAdmin::LogMgr::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsEventLogAdmin::EventLogFactory::_nil ());
-
- DsEventLogAdmin::EventLogFactory_var v_return =
- DsEventLogAdmin::EventLogFactory::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsEventLogAdmin::EventLogFactory::_nil ());
-
- return v_return._retn ();
-}
-
-DsEventLogAdmin::EventLog_ptr
-TAO_EventLogFactory_i::create (
- DsLogAdmin::LogFullActionType full_action,
- CORBA::ULongLong max_size,
- const DsLogAdmin::CapacityAlarmThresholdList & thresholds,
- DsLogAdmin::LogId_out id_out
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidLogFullAction,
- DsLogAdmin::InvalidThreshold))
-{
- this->create_i (full_action,
- max_size,
- & thresholds,
- id_out
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsEventLogAdmin::EventLog::_nil ());
- DsLogAdmin::LogId id = id_out;
-
-#if (TAO_HAS_MINIMUM_POA == 0)
- DsLogAdmin::Log_var log =
- this->create_log_reference (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsEventLogAdmin::EventLog::_nil ());
-#else
- DsLogAdmin::Log_var log =
- this->create_log_object (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsEventLogAdmin::EventLog::_nil ());
-#endif
-
- // narrow to EventLog
- DsEventLogAdmin::EventLog_var event_log =
- DsEventLogAdmin::EventLog::_narrow (log.in ());
-
- // @@ JTC - squelch exception?
- notifier_->object_creation (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsEventLogAdmin::EventLog::_nil ());
-
- return event_log._retn();
-}
-
-DsEventLogAdmin::EventLog_ptr
-TAO_EventLogFactory_i::create_with_id (
- DsLogAdmin::LogId id,
- DsLogAdmin::LogFullActionType full_action,
- CORBA::ULongLong max_size,
- const DsLogAdmin::CapacityAlarmThresholdList & thresholds
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::LogIdAlreadyExists,
- DsLogAdmin::InvalidLogFullAction,
- DsLogAdmin::InvalidThreshold))
-{
- this->create_with_id_i (id,
- full_action,
- max_size,
- & thresholds
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsEventLogAdmin::EventLog::_nil ());
-
-#if (TAO_HAS_MINIMUM_POA == 0)
- DsLogAdmin::Log_var log =
- this->create_log_reference (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsEventLogAdmin::EventLog::_nil ());
-#else
- DsLogAdmin::Log_var log =
- this->create_log_object (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsEventLogAdmin::EventLog::_nil ());
-#endif
-
- // narrow to EventLog
- DsEventLogAdmin::EventLog_var event_log =
- DsEventLogAdmin::EventLog::_narrow (log.in ());
-
- // @@ JTC - squelch exception?
- notifier_->object_creation (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsEventLogAdmin::EventLog::_nil ());
-
- return event_log._retn ();
-}
-
-CORBA::RepositoryId
-TAO_EventLogFactory_i::create_repositoryid ()
-{
- return CORBA::string_dup("IDL:omg.org/DsEventLogAdmin:EventLog:1.0");
-}
-
-PortableServer::ServantBase*
-TAO_EventLogFactory_i::create_log_servant (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL)
-{
- TAO_EventLog_i* event_log_i;
-
- ACE_NEW_THROW_EX (event_log_i,
- TAO_EventLog_i (this->orb_.in (),
- this->poa_.in (),
- this->log_poa_.in (),
- *this,
- this->log_mgr_.in (),
- this->notifier_,
- id
- ),
- CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (0);
-
- event_log_i->init (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- //dhanvey
- //initialise the LogConsumer object
- event_log_i->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- return event_log_i;
-}
-
-CosEventChannelAdmin::ProxyPushSupplier_ptr
-TAO_EventLogFactory_i::obtain_push_supplier (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return consumer_admin_->obtain_push_supplier (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-CosEventChannelAdmin::ProxyPullSupplier_ptr
-TAO_EventLogFactory_i::obtain_pull_supplier (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-
-{
- return consumer_admin_->obtain_pull_supplier (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/orbsvcs/orbsvcs/Log/EventLogFactory_i.h b/TAO/orbsvcs/orbsvcs/Log/EventLogFactory_i.h
deleted file mode 100644
index ea8e6e5c63f..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/EventLogFactory_i.h
+++ /dev/null
@@ -1,152 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file EventLogFactory_i.h
- *
- * $Id$
- *
- * Implementation of the DsEventLogAdmin::EventLogFactory interface.
- *
- *
- * @author Rob Ruff <rruff@scires.com>
- * @author David A. Hanvey <d.hanvey@qub.ac.uk>
- */
-//=============================================================================
-
-#ifndef TAO_TLS_EVENTLOGFACTORY_I_H
-#define TAO_TLS_EVENTLOGFACTORY_I_H
-
-#include /**/ "ace/pre.h"
-
-#include "orbsvcs/DsEventLogAdminS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "orbsvcs/DsLogAdminS.h"
-#include "orbsvcs/Log/LogMgr_i.h"
-#include "orbsvcs/CosEvent/CEC_ConsumerAdmin.h"
-#include "orbsvcs/CosEvent/CEC_EventChannel.h"
-#include "orbsvcs/CosEvent/CEC_Default_Factory.h"
-#include "orbsvcs/Log/EventLog_i.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-class TAO_EventLog_i;
-class TAO_EventLogNotification;
-
-/**
- * @class TAO_EventLogFactory_i
- *
- * @brief The EventLogFactory is a factory that is used to create EventLogs which are event-aware.
- */
-class TAO_EventLog_Serv_Export TAO_EventLogFactory_i :
- public POA_DsEventLogAdmin::EventLogFactory,
- public TAO_LogMgr_i
-
-{
-public:
-
- //= Initialization and termination code.
-
- /// Constructor.
- TAO_EventLogFactory_i (void);
-
- /// Destructor.
- ~TAO_EventLogFactory_i ();
-
- /// Initialise the EventChannel and obtain a
- /// pointer to it.
- CosEventChannelAdmin::EventChannel_ptr
- init (PortableServer::POA_ptr poa
- ACE_ENV_ARG_DECL);
-
- /// Activate this servant with the ORB and POA passed in.
- DsEventLogAdmin::EventLogFactory_ptr
- activate (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa
- ACE_ENV_ARG_DECL);
-
- /// Used to create an EventLog.
- DsEventLogAdmin::EventLog_ptr create (
- DsLogAdmin::LogFullActionType full_action,
- CORBA::ULongLong max_size,
- const DsLogAdmin::CapacityAlarmThresholdList & thresholds,
- DsLogAdmin::LogId_out id
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- DsLogAdmin::InvalidLogFullAction,
- DsLogAdmin::InvalidThreshold
- ));
-
- /// Same as create (), but allows clients to specify the id.
- DsEventLogAdmin::EventLog_ptr create_with_id (
- DsLogAdmin::LogId id,
- DsLogAdmin::LogFullActionType full_action,
- CORBA::ULongLong max_size,
- const DsLogAdmin::CapacityAlarmThresholdList & thresholds
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- DsLogAdmin::LogIdAlreadyExists,
- DsLogAdmin::InvalidLogFullAction,
- DsLogAdmin::InvalidThreshold
- ));
-
- // = Implementation of the CosEventChannelAdmin::ConsumerAdmin methods.
- CosEventChannelAdmin::ProxyPushSupplier_ptr obtain_push_supplier (
- ACE_ENV_SINGLE_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- CosEventChannelAdmin::ProxyPullSupplier_ptr obtain_pull_supplier (
- ACE_ENV_SINGLE_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
-protected:
- virtual CORBA::RepositoryId
- create_repositoryid ();
-
- virtual PortableServer::ServantBase*
- create_log_servant (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL);
-
- /// Our object ref. after <active>ation.
- DsLogAdmin::LogMgr_var log_mgr_;
-
- /// The event channel used for log generated events.
- TAO_CEC_EventChannel *impl;
-
- /// The object used for log generated events.
- TAO_EventLogNotification* notifier_;
-
- /// EventChannel used to obtain the ConsumerAdmin.
- CosEventChannelAdmin::EventChannel_var event_channel_;
-
- /// The ConsumerAdmin that the EventLogFactory supports.
- CosEventChannelAdmin::ConsumerAdmin_var consumer_admin_;
-};
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TLS_EVENTLOGFACTORY_I_H */
diff --git a/TAO/orbsvcs/orbsvcs/Log/EventLogNotification.cpp b/TAO/orbsvcs/orbsvcs/Log/EventLogNotification.cpp
deleted file mode 100644
index 130274497d7..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/EventLogNotification.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-#include "orbsvcs/Log/LogNotification.h"
-#include "orbsvcs/Log/EventLogNotification.h"
-#include "orbsvcs/Time_Utilities.h"
-#include "tao/debug.h"
-
-ACE_RCSID (Log,
- EventLogNotification,
- "$Id$")
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-TAO_EventLogNotification::TAO_EventLogNotification (CosEventChannelAdmin::EventChannel_ptr ec)
-: TAO_LogNotification (), event_channel_ (CosEventChannelAdmin::EventChannel::_duplicate (ec))
-{
- obtain_proxy_consumer ();
-}
-
-TAO_EventLogNotification::~TAO_EventLogNotification (void)
-{
- // No-Op.
-}
-
-void
-TAO_EventLogNotification::disconnect_push_supplier (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->consumer_->disconnect_push_consumer (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-void
-TAO_EventLogNotification::obtain_proxy_consumer()
-{
- CosEventChannelAdmin::SupplierAdmin_var supplier_admin =
- event_channel_->for_suppliers ();
-
- consumer_ = supplier_admin->obtain_push_consumer ();
-
- CosEventComm::PushSupplier_var supplier =
- this->_this ();
-
- consumer_->connect_push_supplier (supplier.in());
-}
-
-void
-TAO_EventLogNotification::send_notification (const CORBA::Any& any
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- consumer_->push (any ACE_ENV_ARG_PARAMETER);
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/orbsvcs/orbsvcs/Log/EventLogNotification.h b/TAO/orbsvcs/orbsvcs/Log/EventLogNotification.h
deleted file mode 100644
index 88306c2eac7..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/EventLogNotification.h
+++ /dev/null
@@ -1,92 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file EventLogNotification.h
- *
- * $Id$
- *
- * Methods to enable log-generated events.
- *
- * @author D A Hanvey <d.hanvey@qub.ac.uk>
- */
-//=============================================================================
-
-#ifndef TAO_TLS_EVENT_LOG_NOTIFICATION_H
-#define TAO_TLS_EVENT_LOG_NOTIFICATION_H
-
-#include /**/ "ace/pre.h"
-
-#include "orbsvcs/CosEvent/CEC_ConsumerAdmin.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "orbsvcs/CosEvent/CEC_EventChannel.h"
-#include "orbsvcs/DsEventLogAdminS.h"
-#include "orbsvcs/CosEvent/CEC_Default_Factory.h"
-#include "orbsvcs/CosEventCommS.h"
-#include "orbsvcs/Log/eventlog_serv_export.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-/**
- * @class TAO_EventLogNotification
- *
- * @brief Used to forward log generated events to a logging server.
- */
-class TAO_EventLog_Serv_Export TAO_EventLogNotification :
- public TAO_LogNotification,
- public POA_CosEventComm::PushSupplier
-{
-public:
-
- // = Initialization and Termination methods.
-
- /// Constructor.
- TAO_EventLogNotification (CosEventChannelAdmin::EventChannel_ptr);
-
- /// Destructor.
- ~TAO_EventLogNotification (void);
-
- /// The skeleton methods.
- virtual void disconnect_push_supplier (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-protected:
- // = Helper methods
-
- /// Used to connect this PushSupplier to the EventChannel
- /// that will log these events.
- void obtain_proxy_consumer ();
-
- /// Send the event on the event channel.
- virtual void send_notification (const CORBA::Any& any ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-
-private:
- /// The ORB reference.
- CORBA::ORB_var orb_;
-
- /// The event channel we connect to.
- CosEventChannelAdmin::EventChannel_var event_channel_;
-
- /// The ProxyPushConsumer used to connect to the event channel.
- CosEventChannelAdmin::ProxyPushConsumer_var consumer_;
-};
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TLS_EVENT_LOG_NOTIFICATION_H */
diff --git a/TAO/orbsvcs/orbsvcs/Log/EventLog_i.cpp b/TAO/orbsvcs/orbsvcs/Log/EventLog_i.cpp
deleted file mode 100644
index 6c6853cf891..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/EventLog_i.cpp
+++ /dev/null
@@ -1,139 +0,0 @@
-#include "orbsvcs/Log/EventLog_i.h"
-#include "orbsvcs/Log/LogMgr_i.h"
-#include "orbsvcs/Log/LogNotification.h"
-
-ACE_RCSID (Log,
- EventLog_i,
- "$Id$")
-
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-TAO_EventLog_i::TAO_EventLog_i (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- PortableServer::POA_ptr log_poa,
- TAO_LogMgr_i &logmgr_i,
- DsLogAdmin::LogMgr_ptr factory,
- TAO_LogNotification *log_notifier,
- DsLogAdmin::LogId id)
- : TAO_Log_i (orb, logmgr_i, factory, id, log_notifier),
- poa_(PortableServer::POA::_duplicate(poa)),
- log_poa_(PortableServer::POA::_duplicate(log_poa))
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- // Create an instance of the event channel.
- TAO_CEC_EventChannel_Attributes attr (this->poa_.in(),
- this->poa_.in());
-
- ACE_NEW_THROW_EX (this->event_channel_,
- TAO_CEC_EventChannel(attr),
- CORBA::NO_MEMORY ());
-}
-
-TAO_EventLog_i::~TAO_EventLog_i ()
-{
- this->event_channel_->destroy ();
-
- delete this->event_channel_;
-}
-
-
-DsLogAdmin::Log_ptr
-TAO_EventLog_i::copy (DsLogAdmin::LogId &id ACE_ENV_ARG_DECL)
-ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Duplicate the log.
- DsEventLogAdmin::EventLogFactory_var eventLogFactory =
- DsEventLogAdmin::EventLogFactory::_narrow (factory_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::Log::_nil ());
-
- DsEventLogAdmin::EventLog_var log =
- eventLogFactory->create (DsLogAdmin::halt, 0, thresholds_, id
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::Log::_nil ());
-
- this->copy_attributes (log.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::Log::_nil ());
-
- return log._retn ();
-
-}
-
-DsLogAdmin::Log_ptr
-TAO_EventLog_i::copy_with_id (DsLogAdmin::LogId id ACE_ENV_ARG_DECL)
-ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Duplicate the log supplying the log id.
- DsEventLogAdmin::EventLogFactory_var eventLogFactory =
- DsEventLogAdmin::EventLogFactory::_narrow (factory_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::Log::_nil ());
-
- DsEventLogAdmin::EventLog_var log =
- eventLogFactory->create_with_id (id, DsLogAdmin::halt, 0, thresholds_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::Log::_nil ());
-
- this->copy_attributes (log.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::Log::_nil ());
-
- return log._retn ();
-
-}
-
-
-void
-TAO_EventLog_i::destroy (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Send event to indicate the log has been deleted.
- notifier_->object_deletion (logid_ ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Remove ourselves from the list of logs.
- this->logmgr_i_.remove (this->logid_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Deregister with POA.
- PortableServer::ObjectId_var id =
- this->log_poa_->servant_to_id (this
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->log_poa_->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-TAO_EventLog_i::activate (ACE_ENV_SINGLE_ARG_DECL)
-{
- CosEventChannelAdmin::ConsumerAdmin_var consumer_admin =
- this->event_channel_->for_consumers (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // Create the PushConsumer that will log the events.
- this->my_log_consumer_ = new TAO_Event_LogConsumer (this);
- ACE_CHECK;
- this->my_log_consumer_->connect (consumer_admin.in ());
-}
-
-
-CosEventChannelAdmin::ConsumerAdmin_ptr
-TAO_EventLog_i::for_consumers (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return this->event_channel_->for_consumers (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-CosEventChannelAdmin::SupplierAdmin_ptr
-TAO_EventLog_i::for_suppliers (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return this->event_channel_->for_suppliers (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/orbsvcs/orbsvcs/Log/EventLog_i.h b/TAO/orbsvcs/orbsvcs/Log/EventLog_i.h
deleted file mode 100644
index 545591ad31a..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/EventLog_i.h
+++ /dev/null
@@ -1,135 +0,0 @@
-// -*- C++ -*-
-
-// ============================================================================
-/**
- * @file EventLog_i.h
- *
- * $Id$
- *
- * Implementation of the DsLogAdmin::EventLog interface.
- * File also conatins TAO_Event_LogConsumer which is used
- * to write events to the Log.
- *
- * @author Rob Ruff <rruff@scires.com>
- * @author D A Hanvey <d.hanvey@qub.ac.uk>
- */
-// ============================================================================
-
-#ifndef TAO_TLS_EVENTLOG_I_H
-#define TAO_TLS_EVENTLOG_I_H
-
-#include /**/ "ace/pre.h"
-
-#include "orbsvcs/DsLogAdminS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-
-#include "orbsvcs/DsEventLogAdminS.h"
-#include "orbsvcs/Log/Log_i.h"
-#include "orbsvcs/CosEvent/CEC_EventChannel.h"
-#include "orbsvcs/Log/EventLogConsumer.h"
-
-#include "orbsvcs/Log/eventlog_serv_export.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-class TAO_LogMgr_i;
-class TAO_EventLog_i;
-class TAO_EventLogFactory_i;
-
-/**
- * @class TAO_EventLog_i
- *
- * @brief The EventLog is an EventChannel and a Log.
- *
- * It is used to log events that pass through the EventChannel.
- * The class supports the @c destroy> method to destroy the Log.
- */
-class TAO_EventLog_i :
- public TAO_Log_i,
- public POA_DsEventLogAdmin::EventLog
-{
-public:
-
- // = Initialization and Termination.
-
- /// Constructor.
- TAO_EventLog_i (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- PortableServer::POA_ptr log_poa,
- TAO_LogMgr_i &logmgr_i,
- DsLogAdmin::LogMgr_ptr factory,
- TAO_LogNotification *log_notifier,
- DsLogAdmin::LogId id);
-
- /// Duplicate the log.
- virtual DsLogAdmin::Log_ptr copy (DsLogAdmin::LogId &id
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Duplicate the log specifying an id.
- virtual DsLogAdmin::Log_ptr copy_with_id (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Destroy the log object and all contained records.
- void
- destroy (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Activate the EventLog.
- void
- activate (ACE_ENV_SINGLE_ARG_DECL);
-
- // = The CosEventChannelAdmin::EventChannel interface methods.
- CosEventChannelAdmin::ConsumerAdmin_ptr
- for_consumers (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- CosEventChannelAdmin::SupplierAdmin_ptr
- for_suppliers (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
-protected:
-
- /// Destructor
- /**
- * Protected destructor to enforce proper memory management through
- * reference counting.
- */
- ~TAO_EventLog_i ();
-
-private:
-
- /// The Event Channel that the log uses.
- TAO_CEC_EventChannel *event_channel_;
-
- /// The PushConsumer that consumes the events and stores them
- /// in the log.
- TAO_Event_LogConsumer *my_log_consumer_;
-
- PortableServer::POA_var poa_;
-
- PortableServer::POA_var log_poa_;
-};
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_TLS_EVENTLOG_I_H */
diff --git a/TAO/orbsvcs/orbsvcs/Log/Hash_Iterator_i.cpp b/TAO/orbsvcs/orbsvcs/Log/Hash_Iterator_i.cpp
deleted file mode 100644
index 233143bb12f..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/Hash_Iterator_i.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-#include "orbsvcs/Log/Hash_Iterator_i.h"
-#include "orbsvcs/Log/Log_Constraint_Interpreter.h"
-#include "orbsvcs/Log/Log_Constraint_Visitors.h"
-#include "orbsvcs/DsLogAdminC.h"
-
-ACE_RCSID (Log,
- Hash_Iterator_i,
- "$Id$")
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-TAO_Hash_Iterator_i::TAO_Hash_Iterator_i (
- ACE_Reactor* reactor,
- TAO_Hash_LogRecordStore* recordstore,
- TAO_Hash_LogRecordStore::LOG_RECORD_STORE_ITER iter,
- TAO_Hash_LogRecordStore::LOG_RECORD_STORE_ITER iter_end,
- CORBA::ULong start,
- const char *constraint,
- CORBA::ULong max_rec_list_len)
- : TAO_Iterator_i(reactor),
- recordstore_ (recordstore),
- iter_ (iter),
- iter_end_ (iter_end),
- current_position_(start),
- constraint_ (constraint),
- max_rec_list_len_ (max_rec_list_len)
-{
-}
-
-
-TAO_Hash_Iterator_i::~TAO_Hash_Iterator_i (void)
-{
-}
-
-
-DsLogAdmin::RecordList*
-TAO_Hash_Iterator_i::get (CORBA::ULong position,
- CORBA::ULong how_many
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidParam))
-{
- ACE_READ_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- this->recordstore_->lock (),
- CORBA::INTERNAL ());
- ACE_CHECK_RETURN (0);
-
- if (position < current_position_)
- {
- ACE_THROW_RETURN (DsLogAdmin::InvalidParam (), 0);
- }
-
- if (how_many == 0)
- {
- how_many = this->max_rec_list_len_;
- }
-
- // Use an Interpreter to build an expression tree.
- TAO_Log_Constraint_Interpreter interpreter (constraint_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- // Sequentially iterate over all the records and pick the ones that
- // meet the constraints.
-
- // Allocate the list of <how_many> length.
- DsLogAdmin::RecordList* rec_list;
- ACE_NEW_THROW_EX (rec_list,
- DsLogAdmin::RecordList (how_many),
- CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (0);
- rec_list->length (how_many);
-
- CORBA::ULong count = 0;
- CORBA::ULong current_position = this->current_position_;
-
- for ( ;
- ((this->iter_ != this->iter_end_) && (count < how_many));
- ++this->iter_)
- {
- // Use an evaluator.
- TAO_Log_Constraint_Visitor visitor (this->iter_->item ());
-
- // Does it match the constraint?
- if (interpreter.evaluate (visitor) == 1)
- {
- if (++current_position >= position)
- {
- (*rec_list)[count] = this->iter_->item ();
- // copy the log record.
- count++;
- }
- }
- }
-
- rec_list->length (count);
- this->current_position_ = current_position;
-
- if (count == 0 && this->iter_ == this->iter_end_)
- {
- // destroy this object..
- this->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (rec_list);
- }
-
- return rec_list;
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/orbsvcs/orbsvcs/Log/Hash_Iterator_i.h b/TAO/orbsvcs/orbsvcs/Log/Hash_Iterator_i.h
deleted file mode 100644
index 375735a43ce..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/Hash_Iterator_i.h
+++ /dev/null
@@ -1,95 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Hash_Iterator_i.h
- *
- * $Id$
- *
- * Implementation of the DsLogAdmin::Iterator interface.
- *
- * @author Matthew Braun <mjb2@cs.wustl.edu>
- * @author Pradeep Gore <pradeep@cs.wustl.edu>
- */
-//=============================================================================
-
-#ifndef TAO_TLS_HASH_ITERATOR_H
-#define TAO_TLS_HASH_ITERATOR_H
-#include /**/ "ace/pre.h"
-#include /**/ "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "orbsvcs/Log/Iterator_i.h"
-#include "orbsvcs/Log/Hash_LogRecordStore.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-/**
- * @class TAO_Hash_Iterator_i
- *
- * @brief Iterator to get LogRecords for the log via a query.
- */
-class TAO_Log_Serv_Export TAO_Hash_Iterator_i
- : public TAO_Iterator_i
-{
-public:
-
- // = Initialization and Termination methods.
-
- /// Constructor.
- TAO_Hash_Iterator_i (ACE_Reactor* reactor,
- TAO_Hash_LogRecordStore* recordstore,
- TAO_Hash_LogRecordStore::LOG_RECORD_STORE_ITER iter,
- TAO_Hash_LogRecordStore::LOG_RECORD_STORE_ITER iter_end,
- CORBA::ULong start,
- const char *constraint,
- CORBA::ULong max_rec_list_len);
-
- /// Destructor.
- virtual ~TAO_Hash_Iterator_i (void);
-
- /// Gets a list of LogRecords.
- virtual DsLogAdmin::RecordList* get (CORBA::ULong position,
- CORBA::ULong how_many
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidParam));
-
-private:
- /// Pointer to record store
- TAO_Hash_LogRecordStore* recordstore_;
-
- /// Current Iterator.
- TAO_Hash_LogRecordStore::LOG_RECORD_STORE_ITER iter_;
-
- /// End Iterator.
- TAO_Hash_LogRecordStore::LOG_RECORD_STORE_ITER iter_end_;
-
- /// Position.
- CORBA::ULong current_position_;
-
- /// Constraint.
- CORBA::String_var constraint_;
-
- /// Max rec list length.
- CORBA::ULong max_rec_list_len_;
-};
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_TLS_HASH_ITERATOR_H */
diff --git a/TAO/orbsvcs/orbsvcs/Log/Hash_LogRecordStore.cpp b/TAO/orbsvcs/orbsvcs/Log/Hash_LogRecordStore.cpp
deleted file mode 100644
index 3ae2885472f..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/Hash_LogRecordStore.cpp
+++ /dev/null
@@ -1,832 +0,0 @@
-#include "orbsvcs/Log/LogMgr_i.h"
-#include "orbsvcs/Log/Hash_LogRecordStore.h"
-#include "orbsvcs/Log/Hash_Iterator_i.h"
-#include "orbsvcs/Log/Log_Constraint_Interpreter.h"
-#include "orbsvcs/Log/Log_Constraint_Visitors.h"
-#include "orbsvcs/Time_Utilities.h"
-#include "tao/Utils/PolicyList_Destroyer.h"
-#include "tao/AnyTypeCode/Any_Unknown_IDL_Type.h"
-#include "tao/ORB_Core.h"
-#include "tao/debug.h"
-#include "ace/OS_NS_sys_time.h"
-
-ACE_RCSID (Log,
- Hash_LogRecordStore,
- "$Id$")
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-TAO_Hash_LogRecordStore::TAO_Hash_LogRecordStore (
- TAO_LogMgr_i* logmgr_i,
- DsLogAdmin::LogId logid,
- DsLogAdmin::LogFullActionType log_full_action,
- CORBA::ULongLong max_size,
- const DsLogAdmin::CapacityAlarmThresholdList* thresholds)
- : logmgr_i_ (logmgr_i),
- maxid_ (0),
- max_size_ (max_size),
- id_ (logid),
- current_size_ (0),
- num_records_ (0),
- gauge_ (0),
- max_rec_list_len_ (LOG_DEFAULT_MAX_REC_LIST_LEN),
- admin_state_ (DsLogAdmin::unlocked),
- forward_state_ (DsLogAdmin::on),
- log_full_action_ (log_full_action),
- max_record_life_ (0),
- reactor_ (logmgr_i_->orb()->orb_core ()->reactor ())
-{
- interval_.start = 0;
- interval_.stop = 0;
-
- if (thresholds)
- {
- this->thresholds_ = *thresholds;
- }
- else
- {
- this->thresholds_.length(1);
- this->thresholds_[0] = 100;
- }
-
- this->log_qos_.length(1);
- this->log_qos_[0] = DsLogAdmin::QoSNone;
-
- PortableServer::POA_ptr log_poa =
- logmgr_i_->log_poa();
-
- // Create POA for iterators
- TAO::Utils::PolicyList_Destroyer policies (2);
- policies.length (2);
-
- policies[0] =
- log_poa->create_lifespan_policy (PortableServer::TRANSIENT);
- policies[1] =
- log_poa->create_id_assignment_policy (PortableServer::SYSTEM_ID);
-
- char buf[32];
- ACE_OS::snprintf (buf, sizeof (buf), "Log%d", (int) id_);
-
- PortableServer::POAManager_var poa_manager =
- log_poa->the_POAManager ();
-
- this->iterator_poa_ =
- log_poa->create_POA(buf, PortableServer::POAManager::_nil(), policies);
-}
-
-TAO_Hash_LogRecordStore::~TAO_Hash_LogRecordStore (void)
-{
- ACE_DEBUG((LM_DEBUG, "TAO_Hash_LogRecordStore::~TAO_Hash_LogRecordStore ()\n"));
- this->iterator_poa_->destroy (1, 0);
- ACE_DEBUG((LM_DEBUG, "TAO_Hash_LogRecordStore::~TAO_Hash_LogRecordStore ()\n"));
-}
-
-int
-TAO_Hash_LogRecordStore::open (void)
-{
- return rec_map_.open ();
-}
-
-int
-TAO_Hash_LogRecordStore::close (void)
-{
- // Close the hash
- return rec_map_.close ();
-}
-
-CORBA::ULongLong
-TAO_Hash_LogRecordStore::get_current_size (ACE_ENV_SINGLE_ARG_DECL)
-{
- return this->current_size_;
-}
-
-CORBA::ULongLong
-TAO_Hash_LogRecordStore::get_n_records (ACE_ENV_SINGLE_ARG_DECL)
-{
- return this->num_records_;
-}
-
-CORBA::ULongLong
-TAO_Hash_LogRecordStore::get_gauge (ACE_ENV_SINGLE_ARG_DECL)
-{
- return this->gauge_;
-}
-
-void
-TAO_Hash_LogRecordStore::reset_gauge (ACE_ENV_SINGLE_ARG_DECL)
-{
- this->gauge_ = 0;
-}
-
-int
-TAO_Hash_LogRecordStore::log (const DsLogAdmin::LogRecord &const_rec
- ACE_ENV_ARG_DECL)
-{
- // Get log record size...
- size_t record_size = log_record_size (const_rec);
-
- // Check if we are allowed to write...
- if (max_size_ !=0 && ((current_size_ + record_size) >= max_size_))
- return 1; // return code for log rec. full
-
- // Copy record...
- DsLogAdmin::LogRecord rec = const_rec;
-
- // Initialize a couple of fields first...
- // ACE emulation of U Long Long (for platforms that don't have one)
- // does not define postfix operators
- rec.id = ++maxid_;
-
- ORBSVCS_Time::Time_Value_to_TimeT(rec.time,ACE_OS::gettimeofday());
-
- // First, bind the id to the LogRecord in the hash_map
- if (this->rec_map_.bind (rec.id, rec) != 0)
- {
-#if defined (ACE_LACKS_LONGLONG_T)
- ACE_ERROR_RETURN ((LM_ERROR,
- "LogRecordStore (%P|%t):Failed to bind %d in the hash map\n",
- ACE_U64_TO_U32(rec.id)),
- -1);
-#else
- ACE_ERROR_RETURN ((LM_ERROR,
- "LogRecordStore (%P|%t):Failed to bind %Q in the hash map\n",
- rec.id),
- -1);
-#endif
- }
-
- // Increment the number of records in the log
- ++this->num_records_;
- this->current_size_ += record_size;
- this->gauge_ += record_size;
-
- return 0;
-}
-
-int
-TAO_Hash_LogRecordStore::retrieve_i (DsLogAdmin::RecordId id,
- DsLogAdmin::LogRecord &rec
- ACE_ENV_ARG_DECL)
-{
- int retval = rec_map_.find (id, rec);
- return retval;
-}
-
-int
-TAO_Hash_LogRecordStore::update_i (DsLogAdmin::LogRecord &rec
- ACE_ENV_ARG_DECL)
-{
- DsLogAdmin::LogRecord oldrec;
-
- if (rec_map_.unbind (rec.id, oldrec) != 0)
- {
- return -1;
- }
-
- --this->num_records_;
- this->current_size_ -= log_record_size(oldrec);
-
- if (rec_map_.bind (rec.id, rec) != 0)
- {
- return -1;
- }
-
- ++this->num_records_;
- this->current_size_ += log_record_size(rec);
-
- return 0;
-}
-
-int
-TAO_Hash_LogRecordStore::remove_i (DsLogAdmin::RecordId id
- ACE_ENV_ARG_DECL)
-{
- DsLogAdmin::LogRecord rec;
- if (rec_map_.unbind (id, rec) != 0)
- {
- return -1;
- }
-
- --this->num_records_;
- this->current_size_ -= log_record_size(rec);
-
- return 0;
-}
-
-void
-TAO_Hash_LogRecordStore::remove_i (LOG_RECORD_STORE_ITER iter
- ACE_ENV_ARG_DECL)
-{
- size_t size = log_record_size(iter->item ());
-
- rec_map_.unbind(&*iter);
-
- --this->num_records_;
- this->current_size_ -= size;
-}
-
-int
-TAO_Hash_LogRecordStore::purge_old_records (ACE_ENV_SINGLE_ARG_DECL)
-{
- CORBA::ULongLong num_records_to_purge = this->num_records_ * 5U / 100U;
-
- if (num_records_to_purge < 1)
- num_records_to_purge = 1;
-
- CORBA::ULong count = 0; // count of matches found.
-
- if (num_records_to_purge > 0 )
- {
- // Create iterators
- LOG_RECORD_STORE_ITER iter (rec_map_.begin ());
- LOG_RECORD_STORE_ITER iter_end (rec_map_.end ());
-
- for (CORBA::ULongLong i = 0;
- iter != iter_end && i < num_records_to_purge;
- ++i)
- {
- this->remove_i (iter++);
- count++;
- }
- }
-
- return count;
-}
-
-void
-TAO_Hash_LogRecordStore::set_record_attribute (DsLogAdmin::RecordId id,
- const DsLogAdmin::NVList
- &attr_list
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidRecordId,
- DsLogAdmin::InvalidAttribute))
-{
- // TODO: validate attributes here.
-
- DsLogAdmin::LogRecord rec;
- if (this->retrieve_i (id, rec ACE_ENV_ARG_PARAMETER) == -1)
- {
- ACE_THROW (DsLogAdmin::InvalidRecordId ());
- }
-
- rec.attr_list = attr_list;
-
- if (this->update_i (rec ACE_ENV_ARG_PARAMETER) == -1)
- {
- ACE_THROW (CORBA::PERSIST_STORE ());
- }
-}
-
-CORBA::ULong
-TAO_Hash_LogRecordStore::set_records_attribute (
- const char *grammar,
- const char *constraint,
- const DsLogAdmin::NVList
- &attr_list ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidGrammar,
- DsLogAdmin::InvalidConstraint,
- DsLogAdmin::InvalidAttribute))
-{
- this->check_grammar (grammar ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- // TODO: validate attributes here.
-
- // Use an Interpreter to build an expression tree.
- TAO_Log_Constraint_Interpreter interpreter (constraint
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- // Create iterators
- LOG_RECORD_STORE_ITER iter (rec_map_.begin ());
- LOG_RECORD_STORE_ITER iter_end (rec_map_.end ());
-
- CORBA::ULong count = 0; // count of matches found.
-
- for ( ; iter != iter_end; ++iter)
- {
- // Use an evaluator.
- TAO_Log_Constraint_Visitor evaluator (iter->item ());
-
- // Does it match the constraint?
- if (interpreter.evaluate (evaluator) == 1)
- {
- set_record_attribute (iter->item ().id, attr_list);
- ++count;
- }
- }
-
- return count;
-}
-
-DsLogAdmin::NVList*
-TAO_Hash_LogRecordStore::get_record_attribute (DsLogAdmin::RecordId id
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidRecordId))
-{
- DsLogAdmin::LogRecord rec;
-
- int retval = this->retrieve_i (id, rec ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- if (retval == -1)
- {
- ACE_THROW_RETURN (DsLogAdmin::InvalidRecordId (),
- 0);
- }
-
- DsLogAdmin::NVList* nvlist = 0;
- ACE_NEW_THROW_EX (nvlist,
- DsLogAdmin::NVList (rec.attr_list),
- CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (0);
-
- return nvlist;
-}
-
-
-int
-TAO_Hash_LogRecordStore::flush (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
-{
- return 0;
-}
-
-size_t
-TAO_Hash_LogRecordStore::log_record_size (const DsLogAdmin::LogRecord &rec)
-{
- size_t mb_size = 0;
- TAO::Any_Impl *impl = rec.info.impl ();
-
- if (impl->encoded ())
- {
- TAO::Unknown_IDL_Type *unk =
- dynamic_cast<TAO::Unknown_IDL_Type *> (impl);
-
- mb_size = unk->_tao_get_cdr ().start ()->length ();
- }
- else
- {
- // If the Any is not encoded, it just has a stored value
- // instead of a CDR stream, not sure what info would be
- // useful here.
- }
-
- return sizeof (rec) + mb_size;
-}
-
-DsLogAdmin::RecordList*
-TAO_Hash_LogRecordStore::query_i (const char *constraint,
- DsLogAdmin::Iterator_out &iter_out,
- CORBA::ULong how_many
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidConstraint))
-{
- // Use an Interpreter to build an expression tree.
- TAO_Log_Constraint_Interpreter interpreter (constraint
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- // Sequentially iterate over all the records and pick the ones that
- // meet the constraints.
-
- // Allocate the list of <how_many> length.
- DsLogAdmin::RecordList* rec_list;
- ACE_NEW_THROW_EX (rec_list,
- DsLogAdmin::RecordList (how_many),
- CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (0);
- rec_list->length(how_many);
-
- // Create iterators
- LOG_RECORD_STORE_ITER iter (rec_map_.begin ());
- LOG_RECORD_STORE_ITER iter_end (rec_map_.end ());
-
- CORBA::ULong count = 0; // count of matches found.
-
- for ( ; ((iter != iter_end) && (count < how_many)); ++iter)
- {
- // Use an evaluator.
- TAO_Log_Constraint_Visitor evaluator (iter->item ());
-
- // Does it match the constraint?
- if (interpreter.evaluate (evaluator) == 1)
- {
- if (TAO_debug_level > 0)
- {
-#if defined (ACE_LACKS_LONGLONG_T)
- ACE_DEBUG ((LM_DEBUG,"Matched constraint! d = %d, Time = %d\n",
- ACE_U64_TO_U32 (iter->item ().id),
- ACE_U64_TO_U32 (iter->item ().time)));
-
-#else
- ACE_DEBUG ((LM_DEBUG,"Matched constraint! d = %Q, Time = %Q\n",
- iter->item ().id,
- iter->item ().time));
-#endif
- }
-
- (*rec_list)[count] = iter->item ();
- // copy the log record.
- count++;
- }
- }
-
- rec_list->length (count);
-
- if (iter != iter_end) // There are more records to process.
- {
- // Create an iterator to pass out.
- TAO_Hash_Iterator_i *iter_query = 0;
- ACE_NEW_THROW_EX (iter_query,
- TAO_Hash_Iterator_i (this->reactor_,
- this,
- iter,
- iter_end,
- count,
- constraint,
- this->max_rec_list_len_),
- CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (rec_list);
-
- // Transfer ownership to the POA.
- PortableServer::ServantBase_var safe_iter_query = iter_query;
-
- // Activate it.
- PortableServer::ObjectId_var oid =
- this->iterator_poa_->activate_object (iter_query);
- CORBA::Object_var obj =
- this->iterator_poa_->id_to_reference (oid);
-
- // Narrow it
- iter_out = DsLogAdmin::Iterator::_narrow (obj.in ());
- }
-
- return rec_list;
-}
-
-DsLogAdmin::RecordList*
-TAO_Hash_LogRecordStore::query (const char *grammar,
- const char *constraint,
- DsLogAdmin::Iterator_out iter_out
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidGrammar,
- DsLogAdmin::InvalidConstraint))
-{
- this->check_grammar (grammar ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- return this->query_i (constraint,
- iter_out,
- this->max_rec_list_len_
- ACE_ENV_ARG_PARAMETER);
-}
-
-DsLogAdmin::RecordList*
-TAO_Hash_LogRecordStore::retrieve (DsLogAdmin::TimeT from_time,
- CORBA::Long how_many,
- DsLogAdmin::Iterator_out iter_out
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Decide between forward vs backward retrieval.
- char constraint[32];
- char uint64_formating[32];
-
-#if defined (ACE_LACKS_LONGLONG_T)
- ACE_OS::sprintf (uint64_formating,
- "%u",
- ACE_U64_TO_U32 (from_time));
-#else
- ACE_OS::sprintf (uint64_formating,
- ACE_UINT64_FORMAT_SPECIFIER,
- from_time);
-#endif
-
- if (how_many >= 0)
- ACE_OS::sprintf (constraint, "time >= %s", uint64_formating);
- else
- {
- ACE_OS::sprintf (constraint, "time < %s", uint64_formating);
- how_many = -(how_many);
- }
-
- return this->query_i (constraint,
- iter_out,
- how_many
- ACE_ENV_ARG_PARAMETER);
-}
-
-CORBA::ULong
-TAO_Hash_LogRecordStore::match (const char* grammar,
- const char *constraint
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidGrammar,
- DsLogAdmin::InvalidConstraint))
-{
- this->check_grammar (grammar ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- // Use an Interpreter to build an expression tree.
- TAO_Log_Constraint_Interpreter interpreter (constraint
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- // Create iterators
- LOG_RECORD_STORE_ITER iter (rec_map_.begin ());
- LOG_RECORD_STORE_ITER iter_end (rec_map_.end ());
-
- CORBA::ULong count = 0; // count of matches found.
-
- for ( ; iter != iter_end; ++iter)
- {
- // Use an evaluator.
- TAO_Log_Constraint_Visitor evaluator (iter->item ());
-
- // Does it match the constraint?
- if (interpreter.evaluate (evaluator) == 1)
- {
- count++;
- }
- }
-
- return count;
-}
-
-CORBA::ULong
-TAO_Hash_LogRecordStore::delete_records (const char *grammar,
- const char *constraint
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidGrammar,
- DsLogAdmin::InvalidConstraint))
-{
- this->check_grammar (grammar ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- // Use an Interpreter to build an expression tree.
- TAO_Log_Constraint_Interpreter interpreter (constraint
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- // Create iterators
- LOG_RECORD_STORE_ITER iter (rec_map_.begin ());
- LOG_RECORD_STORE_ITER iter_end (rec_map_.end ());
-
- CORBA::ULong count = 0; // count of matches found.
-
- while (iter != iter_end)
- {
- // Use an evaluator.
- TAO_Log_Constraint_Visitor evaluator (iter->item ());
-
- // Does it match the constraint?
- if (interpreter.evaluate (evaluator) == 1)
- {
- this->remove_i (iter++);
- count++;
- }
- else
- {
- ++iter;
- }
- }
-
- return count;
-}
-
-CORBA::ULong
-TAO_Hash_LogRecordStore::delete_records_by_id (const DsLogAdmin::RecordIdList &ids
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::ULong count (0);
-
- for (CORBA::ULong i = 0; i < ids.length (); i++)
- {
- if (this->remove_i (ids [i]) == 0)
- {
- count++;
- }
- }
-
- return count;
-}
-
-CORBA::ULong
-TAO_Hash_LogRecordStore::remove_old_records (ACE_ENV_SINGLE_ARG_DECL)
-{
- if (this->max_record_life_ == 0) {
- return 0;
- }
-
- TimeBase::TimeT purge_time;
- ORBSVCS_Time::Time_Value_to_TimeT (purge_time,
- (ACE_OS::gettimeofday() - ACE_Time_Value(this->max_record_life_)));
-
- CORBA::ULongLong p_time = (CORBA::ULongLong) purge_time;
-
- static char out[256] = "";
-
- double temp1 =
- static_cast<double> (ACE_UINT64_DBLCAST_ADAPTER (p_time));
-
- ACE_OS::sprintf (out, "time < %.0f", temp1);
-
- // Use an Interpreter to build an expression tree.
- TAO_Log_Constraint_Interpreter interpreter (out
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- // Create iterators
- LOG_RECORD_STORE_ITER iter (rec_map_.begin ());
- LOG_RECORD_STORE_ITER iter_end (rec_map_.end ());
-
- CORBA::ULong count = 0; // count of matches found.
-
- while (iter != iter_end)
- {
- // Use an evaluator.
- TAO_Log_Constraint_Visitor evaluator (iter->item ());
-
- // Does it match the constraint?
- if (interpreter.evaluate (evaluator) == 1)
- {
- this->remove_i (iter++);
- count++;
- }
- else
- {
- ++iter;
- }
- }
-
- return count;
-}
-
-ACE_SYNCH_RW_MUTEX&
-TAO_Hash_LogRecordStore::lock()
-{
- return lock_;
-}
-
-
-void
-TAO_Hash_LogRecordStore::check_grammar (const char* grammar
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidGrammar))
-{
- // Verify grammar
- if (ACE_OS::strcmp (grammar, "TCL") != 0 &&
- ACE_OS::strcmp (grammar, "ETCL") != 0 &&
- ACE_OS::strcmp (grammar, "EXTENDED_TCL") != 0)
- ACE_THROW (DsLogAdmin::InvalidGrammar ());
-}
-
-
-DsLogAdmin::AdministrativeState
-TAO_Hash_LogRecordStore::get_administrative_state (ACE_ENV_SINGLE_ARG_DECL) const
-{
- return this->admin_state_;
-}
-
-void
-TAO_Hash_LogRecordStore::set_administrative_state (DsLogAdmin::AdministrativeState state
- ACE_ENV_ARG_DECL)
-{
- this->admin_state_ = state;
-}
-
-
-DsLogAdmin::CapacityAlarmThresholdList*
-TAO_Hash_LogRecordStore::get_capacity_alarm_thresholds (ACE_ENV_SINGLE_ARG_DECL) const
-{
- DsLogAdmin::CapacityAlarmThresholdList* ret_val;
- ACE_NEW_THROW_EX (ret_val,
- DsLogAdmin::CapacityAlarmThresholdList (this->thresholds_),
- CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (0);
-
- return ret_val;
-}
-
-void
-TAO_Hash_LogRecordStore::set_capacity_alarm_thresholds (const DsLogAdmin::CapacityAlarmThresholdList& thresholds
- ACE_ENV_ARG_DECL)
-{
- this->thresholds_ = thresholds;
-}
-
-
-
-DsLogAdmin::ForwardingState
-TAO_Hash_LogRecordStore::get_forwarding_state (ACE_ENV_SINGLE_ARG_DECL) const
-{
- return this->forward_state_;
-}
-
-void
-TAO_Hash_LogRecordStore::set_forwarding_state (DsLogAdmin::ForwardingState state
- ACE_ENV_ARG_DECL)
-{
- this->forward_state_ = state;
-}
-
-DsLogAdmin::TimeInterval
-TAO_Hash_LogRecordStore::get_interval (ACE_ENV_SINGLE_ARG_DECL) const
-{
- return this->interval_;
-}
-
-void
-TAO_Hash_LogRecordStore::set_interval (const DsLogAdmin::TimeInterval &interval
- ACE_ENV_ARG_DECL)
-{
- this->interval_ = interval;
-}
-
-
-DsLogAdmin::LogFullActionType
-TAO_Hash_LogRecordStore::get_log_full_action (ACE_ENV_SINGLE_ARG_DECL) const
-{
- return this->log_full_action_;
-}
-
-void
-TAO_Hash_LogRecordStore::set_log_full_action (DsLogAdmin::LogFullActionType action
- ACE_ENV_ARG_DECL)
-{
- this->log_full_action_ = action;
-}
-
-DsLogAdmin::QoSList *
-TAO_Hash_LogRecordStore::get_log_qos (ACE_ENV_SINGLE_ARG_DECL) const
-{
- DsLogAdmin::QoSList* ret_val;
- ACE_NEW_THROW_EX (ret_val,
- DsLogAdmin::QoSList (this->log_qos_),
- CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (0);
-
- return ret_val;
-}
-
-void
-TAO_Hash_LogRecordStore::set_log_qos (const DsLogAdmin::QoSList& qos
- ACE_ENV_ARG_DECL)
-{
- this->log_qos_ = qos;
-}
-
-CORBA::ULong
-TAO_Hash_LogRecordStore::get_max_record_life (ACE_ENV_SINGLE_ARG_DECL) const
-{
- return this->max_record_life_;
-}
-
-void
-TAO_Hash_LogRecordStore::set_max_record_life (CORBA::ULong max_record_life
- ACE_ENV_ARG_DECL)
-{
- this->max_record_life_ = max_record_life;
-}
-
-CORBA::ULongLong
-TAO_Hash_LogRecordStore::get_max_size (ACE_ENV_SINGLE_ARG_DECL) const
-{
- return this->max_size_;
-}
-
-void
-TAO_Hash_LogRecordStore::set_max_size (CORBA::ULongLong size
- ACE_ENV_ARG_DECL)
-{
- this->max_size_ = size;
-}
-
-DsLogAdmin::WeekMask*
-TAO_Hash_LogRecordStore::get_week_mask (ACE_ENV_SINGLE_ARG_DECL)
-{
- DsLogAdmin::WeekMask* ret_val;
- ACE_NEW_THROW_EX (ret_val,
- DsLogAdmin::WeekMask (this->weekmask_),
- CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (0);
-
- return ret_val;
-}
-
-void
-TAO_Hash_LogRecordStore::set_week_mask (const DsLogAdmin::WeekMask &masks
- ACE_ENV_ARG_DECL)
-{
- this->weekmask_ = masks;
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/orbsvcs/orbsvcs/Log/Hash_LogRecordStore.h b/TAO/orbsvcs/orbsvcs/Log/Hash_LogRecordStore.h
deleted file mode 100644
index d4518fd3825..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/Hash_LogRecordStore.h
+++ /dev/null
@@ -1,399 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Hash_LogRecordStore.h
- *
- * $Id$
- *
- * @author Matthew Braun <mjb2@cs.wustl.edu>
- * @author Pradeep Gore <pradeep@cs.wustl.edu>
- * @author David A. Hanvey <d.hanvey@qub.ac.uk>
- */
-//=============================================================================
-
-#ifndef TAO_HASH_LOG_RECORD_STORE_H
-#define TAO_HASH_LOG_RECORD_STORE_H
-
-#include /**/ "ace/pre.h"
-#include /**/ "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "orbsvcs/Log/LogRecordStore.h"
-#include "ace/Containers.h"
-#include "ace/RB_Tree.h"
-#include "ace/Synch_Traits.h"
-#include "ace/Null_Mutex.h"
-#include "ace/RW_Thread_Mutex.h"
-#include "ace/Reactor.h"
-#include "tao/PortableServer/PortableServer.h"
-#include "orbsvcs/Log/log_serv_export.h"
-
-#define LOG_DEFAULT_MAX_REC_LIST_LEN 100
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-class TAO_LogMgr_i;
-
-/**
- * @class TAO_Hash_LogRecordStore
- *
- * @brief A concrete container class for storing DsLogAdmin::LogRecords
- *
- * This implementation uses an ACE_RB_Tree to store LogRecords.
- * Permits fast searches by id and iteration, while allowing for
- * ring-buffer like wrapping of entries.
- *
- * @note The name of this class is somewhat misleading, as it no
- * longer uses a ACE_Hash_Map.
- *
- * @note LogRecords should be indexed by both id and timestamp.
- * However, timestamps are not unique keys and there are no ACE
- * multimap containers.
- *
- * @todo If ACE_RB_Tree supported an insertion "hint" like std::map,
- * log insertion would be O(1) instead of O(lgN). This could be an
- * issue for large log channels.
- */
-class TAO_Log_Serv_Export TAO_Hash_LogRecordStore
- : public TAO_LogRecordStore
-{
- public:
-
- // = Initialization and termination methods
-
- /// Constructor.
- TAO_Hash_LogRecordStore (TAO_LogMgr_i* logmgr,
- DsLogAdmin::LogId id,
- DsLogAdmin::LogFullActionType log_full_action,
- CORBA::ULongLong max_size,
- const DsLogAdmin::CapacityAlarmThresholdList* thresholds
- );
-
- /// Destructor.
- virtual ~TAO_Hash_LogRecordStore (void);
-
- /// Initialization.
- virtual int open (void);
-
- /// Close the record store.
- virtual int close (void);
-
-
- // = Log Parameters
-
- /// Gets the administrative state of the log
- virtual DsLogAdmin::AdministrativeState
- get_administrative_state (ACE_ENV_SINGLE_ARG_DECL) const;
-
- /// Sets the administrative state of the log
- virtual void
- set_administrative_state (DsLogAdmin::AdministrativeState
- ACE_ENV_ARG_DECL);
-
- /// Get the capacity alarm thresholds
- virtual DsLogAdmin::CapacityAlarmThresholdList*
- get_capacity_alarm_thresholds (ACE_ENV_SINGLE_ARG_DECL) const;
-
- /// Set the capacity alarm thresholds
- virtual void
- set_capacity_alarm_thresholds (const DsLogAdmin::CapacityAlarmThresholdList& thresholds
- ACE_ENV_ARG_DECL);
-
- /// Gets the forwarding state
- virtual DsLogAdmin::ForwardingState
- get_forwarding_state (ACE_ENV_SINGLE_ARG_DECL) const;
-
- /// Sets the forwarding state
- virtual void
- set_forwarding_state (DsLogAdmin::ForwardingState state
- ACE_ENV_ARG_DECL);
-
- /// Get the log duration
- virtual DsLogAdmin::TimeInterval
- get_interval (ACE_ENV_SINGLE_ARG_DECL) const;
-
- /// Set the log duration.
- virtual void
- set_interval (const DsLogAdmin::TimeInterval & interval
- ACE_ENV_ARG_DECL);
-
- /// Gets the log full action
- virtual DsLogAdmin::LogFullActionType
- get_log_full_action (ACE_ENV_SINGLE_ARG_DECL) const;
-
- /// Sets the log full action
- virtual void
- set_log_full_action(DsLogAdmin::LogFullActionType action
- ACE_ENV_ARG_DECL);
-
- /// Get the list of the QoS properties supported by the log.
- virtual DsLogAdmin::QoSList*
- get_log_qos (ACE_ENV_SINGLE_ARG_DECL) const;
-
- /// Set the list of the QoS properties supported by the log.
- virtual void
- set_log_qos (const DsLogAdmin::QoSList& qos
- ACE_ENV_ARG_DECL);
-
- /// Gets the max record life
- virtual CORBA::ULong
- get_max_record_life (ACE_ENV_SINGLE_ARG_DECL) const;
-
- /// Sets the max record life
- virtual void
- set_max_record_life (CORBA::ULong life
- ACE_ENV_ARG_DECL);
-
- /// Get the current set value of the max size of the log data.
- virtual CORBA::ULongLong
- get_max_size (ACE_ENV_SINGLE_ARG_DECL) const;
-
- /// Set the max size of log data. size == 0, => infinite.
- virtual void
- set_max_size (CORBA::ULongLong size
- ACE_ENV_ARG_DECL);
-
- /// Get the weekly scheduling parameters
- virtual DsLogAdmin::WeekMask*
- get_week_mask (ACE_ENV_SINGLE_ARG_DECL);
-
- /// Set the weekly scheduling parameters.
- virtual void
- set_week_mask (const DsLogAdmin::WeekMask & masks
- ACE_ENV_ARG_DECL);
-
-
- // = LogRecordStore status methods
-
- /// Gets the current size of the log data.
- virtual CORBA::ULongLong
- get_current_size (ACE_ENV_SINGLE_ARG_DECL);
-
- /// Get the number of records in the log right now.
- virtual CORBA::ULongLong
- get_n_records (ACE_ENV_SINGLE_ARG_DECL);
-
-
- // = LogRecordStore gauge
-
- /// Gets the current value of the "gauge" that measures the total
- /// size of the records written to the log.
- virtual CORBA::ULongLong
- get_gauge(ACE_ENV_SINGLE_ARG_DECL);
-
- /// Resets the "gauge" to 0
- virtual void
- reset_gauge(ACE_ENV_SINGLE_ARG_DECL);
-
-
- // = Record logging, retrieval, update and removal methods.
-
- /// Insert rec into storage. Returns 0 on success -1 on failure and 1
- /// if the log is full.
- virtual int
- log (const DsLogAdmin::LogRecord &rec ACE_ENV_ARG_DECL);
-
- /// Deletes "old" records from the store.
- virtual int
- purge_old_records (ACE_ENV_SINGLE_ARG_DECL);
-
- /// Set single record attributes.
- virtual void
- set_record_attribute (DsLogAdmin::RecordId id,
- const DsLogAdmin::NVList & attr_list
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidRecordId,
- DsLogAdmin::InvalidAttribute));
-
- /// Set the attributes of all records that matches the
- /// constraints with same attr_list.
- virtual CORBA::ULong
- set_records_attribute (const char * grammar,
- const char * c,
- const DsLogAdmin::NVList & attr_list
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidGrammar,
- DsLogAdmin::InvalidConstraint,
- DsLogAdmin::InvalidAttribute));
-
- /// Get the attributes of the record with id <id>. Raises
- /// DsLogAdmin::InvalidRecordId
- virtual DsLogAdmin::NVList*
- get_record_attribute (DsLogAdmin::RecordId id
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidRecordId));
-
- /// Ensure changes have been flushed to persistent media
- /// Returns 0 on success, -1 on failure.
- virtual int
- flush (ACE_ENV_SINGLE_ARG_DECL);
-
- /// Returns all records in the log that match the given constraint
- /// <c>.
- virtual DsLogAdmin::RecordList*
- query (const char * grammar,
- const char * c,
- DsLogAdmin::Iterator_out i
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidGrammar,
- DsLogAdmin::InvalidConstraint));
-
- /// Retrieve <how_many> records from time <from_time> using iterator
- /// <i>.
- virtual DsLogAdmin::RecordList*
- retrieve (DsLogAdmin::TimeT from_time,
- CORBA::Long how_many,
- DsLogAdmin::Iterator_out i
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Returns the number of records matching constraint <c>.
- virtual CORBA::ULong
- match (const char * grammar,
- const char * c
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidGrammar,
- DsLogAdmin::InvalidConstraint));
-
- /// Delete records matching constraint <c>.
- virtual CORBA::ULong
- delete_records (const char * grammar,
- const char * c
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidGrammar,
- DsLogAdmin::InvalidConstraint));
-
- /// Delete records matching ids in <ids>
- virtual CORBA::ULong
- delete_records_by_id (const DsLogAdmin::RecordIdList & ids
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual CORBA::ULong
- remove_old_records (ACE_ENV_SINGLE_ARG_DECL);
-
- /// Read-Write Lock
- virtual ACE_SYNCH_RW_MUTEX& lock();
-
-/* protected: */
- /// Defines types to represent the container that maps RecordIds to
- /// LogRecords.
- typedef ACE_RB_Tree <DsLogAdmin::RecordId,
- DsLogAdmin::LogRecord,
- ACE_Less_Than<DsLogAdmin::RecordId>,
- ACE_Null_Mutex> LOG_RECORD_STORE;
- typedef LOG_RECORD_STORE::ITERATOR LOG_RECORD_STORE_ITER;
- typedef LOG_RECORD_STORE::ENTRY LOG_RECORD_STORE_ENTRY;
-
-protected:
- /// Set rec to the pointer to the LogRecord with the given
- /// id. Returns 0 on success, -1 on failure.
- int retrieve_i (DsLogAdmin::RecordId id,
- DsLogAdmin::LogRecord &rec
- ACE_ENV_ARG_DECL);
-
- /// Update into storage. Returns 0 on success -1 on failure.
- int update_i (DsLogAdmin::LogRecord &rec
- ACE_ENV_ARG_DECL);
-
- /// Remove the record with id <id> from the LogRecordStore.
- /// Returns 0 on success, -1 on failure.
- int remove_i (DsLogAdmin::RecordId id
- ACE_ENV_ARG_DECL);
-
- /// Remove the record from the LogRecordStore.
- void remove_i (LOG_RECORD_STORE_ITER iter
- ACE_ENV_ARG_DECL);
-
- DsLogAdmin::RecordList* query_i (const char *constraint,
- DsLogAdmin::Iterator_out &iter_out,
- CORBA::ULong how_many
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidConstraint));
-
- /// Throws DsLogAdmin::InvalidGrammar if we don't support this grammar.
- void check_grammar (const char* grammar ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidGrammar));
-
-
- /// The size of a LogRecord
- size_t log_record_size(const DsLogAdmin::LogRecord &rec);
-
- TAO_LogMgr_i* logmgr_i_;
-
- /// Assigned to a new RecordId and then incremented
- /// @@ Should I have a list of reclaimed id's for when records are
- /// deleted?
- DsLogAdmin::RecordId maxid_;
-
- /// The maximum size of the log.
- CORBA::ULongLong max_size_;
-
- /// The log id to which this LogRecordStore relates.
- DsLogAdmin::LogId id_;
-
- /// The current size (in bytes) of the log.
- CORBA::ULongLong current_size_;
-
- /// The current number of records in the log.
- CORBA::ULongLong num_records_;
-
- /// The current value of the "gauge" that measures the total size of
- /// the records written to the log.
- CORBA::ULongLong gauge_;
-
- /// The max size of the record list returned in a query.
- CORBA::ULong max_rec_list_len_;
-
- /// The map of RecordId's to LogRecord's
- LOG_RECORD_STORE rec_map_;
-
-
- /// The administrative state of the log
- DsLogAdmin::AdministrativeState admin_state_;
-
- DsLogAdmin::CapacityAlarmThresholdList
- thresholds_;
-
- /// The forwarding state of the log
- DsLogAdmin::ForwardingState forward_state_;
-
- /// The interval during which the log should be in operation
- DsLogAdmin::TimeInterval interval_;
-
- /// The action to take if the log reaches max capacity
- DsLogAdmin::LogFullActionType log_full_action_;
-
- /// The list of the QoS properties supported by the log.
- DsLogAdmin::QoSList log_qos_;
-
- /// The maximum record lifetime
- CORBA::ULong max_record_life_;
-
- /// The days of the week that the log should be operational
- DsLogAdmin::WeekMask weekmask_;
-
-
- ACE_Reactor* reactor_;
-
- PortableServer::POA_var iterator_poa_;
-
- mutable ACE_SYNCH_RW_MUTEX lock_;
-};
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#include /**/ "ace/post.h"
-#endif /*TAO_HASH_LOG_RECORD_STORE_H*/
diff --git a/TAO/orbsvcs/orbsvcs/Log/Hash_LogStore.cpp b/TAO/orbsvcs/orbsvcs/Log/Hash_LogStore.cpp
deleted file mode 100644
index 458cfca4155..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/Hash_LogStore.cpp
+++ /dev/null
@@ -1,269 +0,0 @@
-#include "orbsvcs/Log/Hash_LogStore.h"
-#include "orbsvcs/Log/Hash_LogRecordStore.h"
-#include "orbsvcs/Log/LogMgr_i.h"
-#include "ace/Auto_Ptr.h"
-
-ACE_RCSID (Log,
- Hash_LogStore,
- "$Id$")
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-TAO_Hash_LogStore::TAO_Hash_LogStore(TAO_LogMgr_i* logmgr_i)
- : next_id_ (0),
- logmgr_i_ (logmgr_i)
-{
-}
-
-
-TAO_Hash_LogStore::~TAO_Hash_LogStore()
-{
-}
-
-
-DsLogAdmin::LogList*
-TAO_Hash_LogStore::list_logs (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- ACE_READ_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- lock_,
- CORBA::INTERNAL ());
- ACE_CHECK_RETURN (0);
-
- DsLogAdmin::LogList* list;
-
- // Figure out the length of the list.
- CORBA::ULong len = static_cast<CORBA::ULong> (hash_map_.current_size ());
-
- // Allocate the list of <len> length.
- ACE_NEW_THROW_EX (list,
- DsLogAdmin::LogList (len),
- CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (0);
-
- list->length (len);
-
- // Create an iterator
- HASHMAP::ITERATOR iter (hash_map_);
-
- // Iterate over and populate the list.
- HASHMAP::ENTRY *hash_entry = 0;
-
- for (CORBA::ULong i = 0; i < len; i++)
- {
- iter.next (hash_entry);
- iter.advance ();
- (*list)[i] = logmgr_i_->create_log_reference (static_cast<DsLogAdmin::LogId> (hash_entry->ext_id_)
- ACE_ENV_ARG_PARAMETER);
- }
-
- return list;
-}
-
-DsLogAdmin::LogIdList*
-TAO_Hash_LogStore::list_logs_by_id (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- ACE_READ_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- lock_,
- CORBA::INTERNAL ());
- ACE_CHECK_RETURN (0);
-
- DsLogAdmin::LogIdList* list;
-
- // Figure out the length of the list.
- CORBA::ULong len = static_cast<CORBA::ULong> (hash_map_.current_size ());
-
- // Allocate the list of <len> length.
- ACE_NEW_THROW_EX (list,
- DsLogAdmin::LogIdList (len),
- CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (0);
-
- list->length (len);
-
- // Create an iterator
- HASHMAP::ITERATOR iter (hash_map_);
-
- // Iterate over and populate the list.
- HASHMAP::ENTRY *hash_entry = 0;
-
- for (CORBA::ULong i = 0; i < len; i++)
- {
- iter.next (hash_entry);
- iter.advance ();
- (*list)[i] = hash_entry->ext_id_;
- }
-
- return list;
-}
-
-
-DsLogAdmin::Log_ptr
-TAO_Hash_LogStore::find_log (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- ACE_READ_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- lock_,
- CORBA::INTERNAL ());
- ACE_CHECK (DsLogAdmin::Log::_nil ());
-
- if (hash_map_.find (id) != 0)
- {
- return DsLogAdmin::Log::_nil ();
- }
- else
- {
- return logmgr_i_->create_log_reference (id ACE_ENV_ARG_PARAMETER);
- }
-}
-
-
-bool
-TAO_Hash_LogStore::exists (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL)
-{
- ACE_READ_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- lock_,
- CORBA::INTERNAL ());
- ACE_CHECK_RETURN (false);
-
- return (this->hash_map_.find (id) == 0);
-}
-
-
-int
-TAO_Hash_LogStore::remove (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL)
-{
- ACE_WRITE_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- lock_,
- CORBA::INTERNAL ());
- ACE_CHECK_RETURN (-1);
-
- TAO_Hash_LogRecordStore* recordstore;
-
- int retval = this->hash_map_.unbind (id, recordstore);
- if (retval == 0)
- {
- delete recordstore;
- }
-
- return retval;
-}
-
-
-void
-TAO_Hash_LogStore::create(DsLogAdmin::LogFullActionType full_action,
- CORBA::ULongLong max_size,
- const DsLogAdmin::CapacityAlarmThresholdList* thresholds,
- DsLogAdmin::LogId_out id_out
- ACE_ENV_ARG_DECL)
-{
- ACE_WRITE_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- lock_,
- CORBA::INTERNAL ());
- ACE_CHECK;
-
- DsLogAdmin::LogId id;
-
- while (this->hash_map_.find((id = this->next_id_++)) == 0)
- ;
- id_out = id;
-
- TAO_Hash_LogRecordStore* impl = 0;
- ACE_NEW_THROW_EX (impl,
- TAO_Hash_LogRecordStore (this->logmgr_i_,
- id,
- full_action,
- max_size,
- thresholds
- ),
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- auto_ptr<TAO_Hash_LogRecordStore> recordstore (impl);
-
- if (this->hash_map_.bind (id, recordstore.get ()) != 0)
- {
- ACE_THROW (CORBA::INTERNAL ());
- }
-
- recordstore.release ();
-}
-
-
-void
-TAO_Hash_LogStore::create_with_id (DsLogAdmin::LogId id,
- DsLogAdmin::LogFullActionType full_action,
- CORBA::ULongLong max_size,
- const DsLogAdmin::CapacityAlarmThresholdList* thresholds
- ACE_ENV_ARG_DECL)
-{
- ACE_WRITE_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- lock_,
- CORBA::INTERNAL ());
- ACE_CHECK;
-
- if (this->hash_map_.find (id) == 0)
- {
- ACE_THROW (DsLogAdmin::LogIdAlreadyExists ());
- }
-
- TAO_Hash_LogRecordStore* impl = 0;
- ACE_NEW_THROW_EX (impl,
- TAO_Hash_LogRecordStore (this->logmgr_i_,
- id,
- full_action,
- max_size,
- thresholds
- ),
- CORBA::NO_MEMORY ());
- ACE_CHECK;
-
- auto_ptr<TAO_Hash_LogRecordStore> recordstore (impl);
-
- if (this->hash_map_.bind (id, recordstore.get ()) != 0)
- {
- ACE_THROW (CORBA::INTERNAL ());
- }
-
- recordstore.release ();
-}
-
-
-TAO_LogRecordStore*
-TAO_Hash_LogStore::get_log_record_store (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL)
-{
- ACE_READ_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- lock_,
- CORBA::INTERNAL ());
- ACE_CHECK_RETURN (0);
-
- TAO_Hash_LogRecordStore* recordstore = 0;
-
- if (hash_map_.find (id, recordstore) != 0)
- {
- return 0;
- }
-
- return recordstore;
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/orbsvcs/orbsvcs/Log/Hash_LogStore.h b/TAO/orbsvcs/orbsvcs/Log/Hash_LogStore.h
deleted file mode 100644
index 7c43c34a8a7..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/Hash_LogStore.h
+++ /dev/null
@@ -1,130 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Hash_LogStore.h
- *
- * $Id$
- *
- * @author Matthew Braun <mjb2@cs.wustl.edu>
- * @author Pradeep Gore <pradeep@cs.wustl.edu>
- * @author David A. Hanvey <d.hanvey@qub.ac.uk>
- */
-//=============================================================================
-
-#ifndef TAO_TLS_HASH_LOGSTORE_H
-#define TAO_TLS_HASH_LOGSTORE_H
-
-#include /**/ "ace/pre.h"
-#include /**/ "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "orbsvcs/Log/LogStore.h"
-#include "ace/Hash_Map_Manager.h"
-#include "ace/Synch_Traits.h"
-#include "ace/Null_Mutex.h"
-#include "ace/RW_Thread_Mutex.h"
-#include "orbsvcs/Log/log_serv_export.h"
-
-ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-class ACE_Reactor;
-ACE_END_VERSIONED_NAMESPACE_DECL
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-class TAO_LogMgr_i;
-class TAO_Hash_LogRecordStore;
-
-class TAO_Log_Serv_Export TAO_Hash_LogStore
- : public TAO_LogStore
-{
-public:
- // = Initialization and Termination Methods
-
- /// Constructor.
- TAO_Hash_LogStore (TAO_LogMgr_i* mgr);
-
- /// Destructor.
- virtual ~TAO_Hash_LogStore ();
-
-
- /// Lists all logs created by the log factory.
- virtual DsLogAdmin::LogList *
- list_logs (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- /// Lists all log ids.
- virtual DsLogAdmin::LogIdList *
- list_logs_by_id (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- /// Returns a reference to the log with the supplied id.
- virtual DsLogAdmin::Log_ptr
- find_log (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- /// Returns true if log exists, otherwise false
- virtual bool exists (DsLogAdmin::LogId id ACE_ENV_ARG_DECL);
-
- /// Remove the given entry from the hash table.
- virtual int remove (DsLogAdmin::LogId id ACE_ENV_ARG_DECL);
-
- /// @brief Create log
- virtual void
- create (DsLogAdmin::LogFullActionType full_action,
- CORBA::ULongLong max_size,
- const DsLogAdmin::CapacityAlarmThresholdList* thresholds,
- DsLogAdmin::LogId_out id_out
- ACE_ENV_ARG_DECL);
-
- /// @brief Create log
- virtual void
- create_with_id (DsLogAdmin::LogId id,
- DsLogAdmin::LogFullActionType full_action,
- CORBA::ULongLong max_size,
- const DsLogAdmin::CapacityAlarmThresholdList* thresholds
- ACE_ENV_ARG_DECL);
-
- /// @brief Get log record store
- ///
- /// Get/Create a log record store for log channel @a id.
- ///
- /// @param id log id
- ///
- virtual TAO_LogRecordStore*
- get_log_record_store (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL);
-
-private:
- ACE_SYNCH_RW_MUTEX lock_;
-
- /// Define the HASHMAP.
- typedef ACE_Hash_Map_Manager <DsLogAdmin::LogId,
- TAO_Hash_LogRecordStore*,
- ACE_Null_Mutex> HASHMAP;
-
- /// The map of Logs created.
- HASHMAP hash_map_;
-
- /// The next log id to be assigned (if it hasn't already been
- /// taken by create_with_id().
- DsLogAdmin::LogId next_id_;
-
- TAO_LogMgr_i* logmgr_i_;
-};
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#include /**/ "ace/post.h"
-
-#endif /* TAO_TLS_HASH_LOGSTORE_H */
diff --git a/TAO/orbsvcs/orbsvcs/Log/Hash_Persistence_Strategy.cpp b/TAO/orbsvcs/orbsvcs/Log/Hash_Persistence_Strategy.cpp
deleted file mode 100644
index 3d8882352c6..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/Hash_Persistence_Strategy.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-#include "orbsvcs/Log/Hash_Persistence_Strategy.h"
-#include "orbsvcs/Log/Hash_LogStore.h"
-
-ACE_RCSID (Log,
- Hash_Persistence_Strategy,
- "$Id$")
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-TAO_Hash_Persistence_Strategy::TAO_Hash_Persistence_Strategy()
-{
-}
-
-
-TAO_Hash_Persistence_Strategy::~TAO_Hash_Persistence_Strategy()
-{
-}
-
-TAO_LogStore *
-TAO_Hash_Persistence_Strategy::create_log_store(TAO_LogMgr_i *logmgr_i)
-{
- return new TAO_Hash_LogStore (logmgr_i);
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/orbsvcs/orbsvcs/Log/Hash_Persistence_Strategy.h b/TAO/orbsvcs/orbsvcs/Log/Hash_Persistence_Strategy.h
deleted file mode 100644
index 43f5e4a6ae5..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/Hash_Persistence_Strategy.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Hash_Persistence_Strategy.h
- *
- * $Id$
- *
- * @author Matthew Braun <mjb2@cs.wustl.edu>
- * @author Pradeep Gore <pradeep@cs.wustl.edu>
- * @author David A. Hanvey <d.hanvey@qub.ac.uk>
- */
-//=============================================================================
-
-#ifndef TAO_TLS_HASH_PERSISTENCE_STRATEGY_H
-#define TAO_TLS_HASH_PERSISTENCE_STRATEGY_H
-
-#include /**/ "ace/pre.h"
-#include /**/ "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "orbsvcs/Log/Log_Persistence_Strategy.h"
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-/**
- * @class TAO_Hash_Persistence_Strategy
- *
- * @brief Concrete Strategy for Log / Log Record Storage
- *
- * Stores log parameters and log records in hash maps
- */
-class TAO_Log_Serv_Export TAO_Hash_Persistence_Strategy
- : public TAO_Log_Persistence_Strategy
-{
-public:
- // = Initialization and Termination Methods
-
- /// Constructor.
- TAO_Hash_Persistence_Strategy ();
-
- /// Destructor.
- virtual ~TAO_Hash_Persistence_Strategy ();
-
- /// @brief Log Store Factory
- virtual TAO_LogStore*
- create_log_store (TAO_LogMgr_i* mgr);
-
-private:
-};
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#include /**/ "ace/post.h"
-
-#endif /* TAO_TLS_HASH_PERSISTENCE_STRATEGY_H */
diff --git a/TAO/orbsvcs/orbsvcs/Log/Iterator_i.cpp b/TAO/orbsvcs/orbsvcs/Log/Iterator_i.cpp
deleted file mode 100644
index d26dc48d882..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/Iterator_i.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-#include "orbsvcs/Log/Iterator_i.h"
-
-ACE_RCSID (Log,
- Iterator_i,
- "$Id$")
-
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-// iterator inactivity timeout
-ACE_Time_Value
-TAO_Iterator_i::timeout_(60 * 60);
-
-TAO_Iterator_i::TAO_Iterator_i (ACE_Reactor* reactor)
- : reactor_ (reactor)
-{
- if (this->timeout_ != ACE_Time_Value::zero)
- {
- this->timer_id_ =
- this->reactor_->schedule_timer (this, 0, this->timeout_);
- }
-}
-
-
-TAO_Iterator_i::~TAO_Iterator_i (void)
-{
- // cancel timer
- if (this->timer_id_ != -1)
- {
- this->reactor_->cancel_timer (this->timer_id_);
- }
-}
-
-
-void
-TAO_Iterator_i::destroy (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- PortableServer::POA_ptr poa =
- this->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableServer::ObjectId_var oid =
- poa->servant_to_id (this
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Goodbye cruel world...
- // deactivate from the poa.
- poa->deactivate_object (oid.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- return;
-}
-
-
-int
-TAO_Iterator_i::handle_timeout(const ACE_Time_Value&, const void*)
-{
- ACE_TRY_NEW_ENV
- {
- this->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/orbsvcs/orbsvcs/Log/Iterator_i.h b/TAO/orbsvcs/orbsvcs/Log/Iterator_i.h
deleted file mode 100644
index acfa7b89f63..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/Iterator_i.h
+++ /dev/null
@@ -1,91 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Iterator_i.h
- *
- * $Id$
- *
- * Implementation of the DsLogAdmin::Iterator interface.
- *
- *
- * @author Matthew Braun <mjb2@cs.wustl.edu>
- * @author Pradeep Gore <pradeep@cs.wustl.edu>
- *
- */
-//=============================================================================
-
-#ifndef TAO_TLS_ITERATOR_H
-#define TAO_TLS_ITERATOR_H
-#include /**/ "ace/pre.h"
-#include /**/ "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "orbsvcs/DsLogAdminS.h"
-#include "ace/Event_Handler.h"
-#include "ace/Reactor.h"
-#include "orbsvcs/Log/log_serv_export.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-/**
- * @class TAO_Iterator_i
- *
- * @brief Iterator to get LogRecords for the log via a query.
- */
-class TAO_Log_Serv_Export TAO_Iterator_i
- : public virtual POA_DsLogAdmin::Iterator,
- public ACE_Event_Handler
-{
-public:
-
- // = Initialization and Termination methods.
-
- /// Constructor.
- TAO_Iterator_i (ACE_Reactor* reactor);
-
- /// Destructor.
- virtual ~TAO_Iterator_i (void);
-
- /// Gets a list of LogRecords.
- virtual DsLogAdmin::RecordList* get (CORBA::ULong position,
- CORBA::ULong how_many
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidParam)) = 0;
-
- /// This destroys the iterator.
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-protected:
- /// Reactor
- ACE_Reactor* reactor_;
-
- /// Timeout
- static ACE_Time_Value timeout_;
-
- /// Timer ID
- long timer_id_;
-
- virtual int handle_timeout (const ACE_Time_Value&, const void *);
-};
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_TLS_ITERATOR_H */
diff --git a/TAO/orbsvcs/orbsvcs/Log/LogActivator.cpp b/TAO/orbsvcs/orbsvcs/Log/LogActivator.cpp
deleted file mode 100644
index 5f7c64cd724..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/LogActivator.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-#include "orbsvcs/Log/LogActivator.h"
-
-ACE_RCSID (Log,
- LogActivator,
- "$Id$")
-
-#if (TAO_HAS_MINIMUM_POA == 0)
-#include "orbsvcs/Log/LogMgr_i.h"
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-TAO_LogActivator::TAO_LogActivator (TAO_LogMgr_i &logmgr_i)
- : logmgr_i_ (logmgr_i)
-{
-}
-
-TAO_LogActivator::~TAO_LogActivator ()
-{
-}
-
-PortableServer::Servant
-TAO_LogActivator::incarnate (const PortableServer::ObjectId& oid,
- PortableServer::POA_ptr
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableServer::ForwardRequest
- ))
-{
- CORBA::String_var poa_id = PortableServer::ObjectId_to_string (oid);
-
- DsLogAdmin::LogId id = ACE_OS::strtoul(poa_id.in (), 0, 0);
-
- if (!logmgr_i_.exists(id ACE_ENV_ARG_PARAMETER))
- ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), 0);
- ACE_CHECK_RETURN(0);
-
- return logmgr_i_.create_log_servant (id ACE_ENV_ARG_PARAMETER);
-}
-
-
-void
-TAO_LogActivator::etherealize (const PortableServer::ObjectId&,
- PortableServer::POA_ptr,
- PortableServer::Servant servant,
- CORBA::Boolean,
- CORBA::Boolean remaining_activations
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (!remaining_activations)
- {
- delete servant;
- }
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#endif
diff --git a/TAO/orbsvcs/orbsvcs/Log/LogActivator.h b/TAO/orbsvcs/orbsvcs/Log/LogActivator.h
deleted file mode 100644
index c25f466b0ed..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/LogActivator.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file LogActivator.h
- *
- * $Id$
- *
- */
-//=============================================================================
-
-#ifndef TAO_TLS_LOGACTIVATOR_H
-#define TAO_TLS_LOGACTIVATOR_H
-
-#include /**/ "ace/pre.h"
-
-#include "orbsvcs/DsLogAdminC.h"
-
-#if (TAO_HAS_MINIMUM_POA == 0)
-
-#include "orbsvcs/Log/log_serv_export.h"
-
-#include "tao/PortableServer/PortableServer.h"
-#include "tao/PortableServer/ServantActivatorC.h"
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-// forward declarations
-class TAO_LogMgr_i;
-
-/// @class TAO_LogActivator
-/// @brief Log Servant Activator
-///
-/// A servant activator to create Log servants. Permits servants to
-/// be "lazily" created on demand. This allows persistent logging
-/// strategies to avoid creating servants for each log when the
-/// service is started.
-///
-class TAO_Log_Serv_Export TAO_LogActivator
- : public virtual PortableServer::ServantActivator
-{
-public:
- /// @brief Constructor
- ///
- TAO_LogActivator(TAO_LogMgr_i& logmgr_i);
-
- /// @brief Destructor
- ///
- virtual ~TAO_LogActivator();
-
- virtual PortableServer::Servant incarnate (const PortableServer::ObjectId& oid,
- PortableServer::POA_ptr poa
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- PortableServer::ForwardRequest
- ));
-
- virtual void etherealize (const PortableServer::ObjectId& oid,
- PortableServer::POA_ptr poa,
- PortableServer::Servant servant,
- CORBA::Boolean cleanup_in_progress,
- CORBA::Boolean remaining_activations
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
-private:
- TAO_LogMgr_i& logmgr_i_;
-};
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#endif /* TAO_HAS_MINIMUM_POA */
-
-#include /**/ "ace/post.h"
-#endif
diff --git a/TAO/orbsvcs/orbsvcs/Log/LogMgr_i.cpp b/TAO/orbsvcs/orbsvcs/Log/LogMgr_i.cpp
deleted file mode 100644
index 23bb04d2ea1..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/LogMgr_i.cpp
+++ /dev/null
@@ -1,296 +0,0 @@
-#include "orbsvcs/Log/LogMgr_i.h"
-#include "orbsvcs/Log/LogActivator.h"
-#include "ace/Dynamic_Service.h"
-#include "tao/Utils/PolicyList_Destroyer.h"
-#include "orbsvcs/Log/Hash_Persistence_Strategy.h"
-#include "orbsvcs/Log/LogStore.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (Log,
- LogMgr_i,
- "$Id$")
-
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-TAO_LogMgr_i::TAO_LogMgr_i ()
- : logstore_ (0)
-{
-}
-
-
-TAO_LogMgr_i::~TAO_LogMgr_i ()
-{
- delete logstore_;
-}
-
-
-void
-TAO_LogMgr_i::init (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa
- ACE_ENV_ARG_DECL)
-{
- this->orb_ = CORBA::ORB::_duplicate (orb);
- this->poa_ = PortableServer::POA::_duplicate (poa);
-
- PortableServer::POAManager_var poa_manager =
- this->poa_->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- {
- TAO::Utils::PolicyList_Destroyer policies(1);
-
- // Create Factory POA
- policies.length (1);
- policies[0] =
- this->poa_->create_lifespan_policy (PortableServer::PERSISTENT
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->factory_poa_ = this->poa_->create_POA ("factory_POA",
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
-
- {
- TAO::Utils::PolicyList_Destroyer policies(2);
-
- // Create Log POA
- policies.length (2);
- policies[0] =
- this->poa_->create_lifespan_policy (PortableServer::PERSISTENT
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- policies[1] =
- this->poa_->create_id_assignment_policy (PortableServer::USER_ID
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
-#if (TAO_HAS_MINIMUM_POA == 0)
- policies.length(4);
- policies[2] =
- this->poa_->create_servant_retention_policy (PortableServer::RETAIN
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- policies[3] =
- this->poa_->create_request_processing_policy (PortableServer::USE_SERVANT_MANAGER
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-#endif
-
- this->log_poa_ = this->factory_poa_->create_POA ("log_POA",
- poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
-#if (TAO_HAS_MINIMUM_POA == 0)
- PortableServer::ServantActivator* servant_activator = 0;
-
- ACE_NEW_THROW_EX (servant_activator,
- TAO_LogActivator (*this),
- CORBA::NO_MEMORY ());
-
- this->log_poa_->set_servant_manager(servant_activator
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-#endif
-
- // Load Log Strategy
- TAO_Log_Persistence_Strategy* strategy_ = 0;
-
- strategy_ =
- ACE_Dynamic_Service<TAO_Log_Persistence_Strategy>::instance ("Log_Persistence");
- if (strategy_ == 0)
- {
- strategy_ = new TAO_Hash_Persistence_Strategy;
- }
-
- logstore_ = strategy_->create_log_store (this);
-}
-
-PortableServer::ObjectId*
-TAO_LogMgr_i::create_objectid (DsLogAdmin::LogId id)
-{
- char buf[32];
- ACE_OS::sprintf(buf, "%lu", static_cast<unsigned long>(id));
-
- PortableServer::ObjectId_var oid =
- PortableServer::string_to_ObjectId(buf);
-
- return oid._retn ();
-}
-
-DsLogAdmin::Log_ptr
-TAO_LogMgr_i::create_log_reference (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL)
-{
- PortableServer::ObjectId_var oid =
- this->create_objectid (id);
- CORBA::RepositoryId_var intf =
- this->create_repositoryid ();
-
- CORBA::Object_var obj =
- this->log_poa_->create_reference_with_id (oid.in (),
- intf.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::Log::_nil ());
-
- DsLogAdmin::Log_var log =
- DsLogAdmin::Log::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::Log::_nil ());
-
- return log._retn();
-}
-
-DsLogAdmin::Log_ptr
-TAO_LogMgr_i::create_log_object (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL)
-{
- PortableServer::ServantBase* servant = 0;
-
- servant = create_log_servant (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::Log::_nil ());
-
- PortableServer::ServantBase_var safe_servant = servant;
- // Transfer ownership to the POA.
-
- // Obtain ObjectId
- PortableServer::ObjectId_var oid = this->create_objectid (id);
-
- // Register with the poa
- this->log_poa_->activate_object_with_id (oid.in (),
- servant
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::Log::_nil ());
-
- return create_log_reference (id ACE_ENV_ARG_PARAMETER);
-}
-
-DsLogAdmin::LogList*
-TAO_LogMgr_i::list_logs (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return this->logstore_->list_logs (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-
-DsLogAdmin::LogIdList*
-TAO_LogMgr_i::list_logs_by_id (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return this->logstore_->list_logs_by_id (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-
-DsLogAdmin::Log_ptr
-TAO_LogMgr_i::find_log (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return this->logstore_->find_log (id ACE_ENV_ARG_PARAMETER);
-}
-
-
-TAO_LogRecordStore*
-TAO_LogMgr_i::get_log_record_store (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL)
-{
- return this->logstore_->get_log_record_store (id ACE_ENV_ARG_PARAMETER);
-}
-
-
-bool
-TAO_LogMgr_i::exists (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL)
-{
- return this->logstore_->exists (id ACE_ENV_ARG_PARAMETER);
-}
-
-
-int
-TAO_LogMgr_i::remove (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL)
-{
- return this->logstore_->remove (id ACE_ENV_ARG_PARAMETER);
-}
-
-void
-TAO_LogMgr_i::create_i (DsLogAdmin::LogFullActionType full_action,
- CORBA::ULongLong max_size,
- const DsLogAdmin::CapacityAlarmThresholdList* thresholds,
- DsLogAdmin::LogId_out id_out
- ACE_ENV_ARG_DECL)
-{
- // Validate log_full_action before creating log
- if (full_action != DsLogAdmin::wrap && full_action != DsLogAdmin::halt)
- ACE_THROW (DsLogAdmin::InvalidLogFullAction ());
-
- if (thresholds)
- {
- // @@ JTC - validate thresholds here
- }
-
- this->logstore_->create (full_action,
- max_size,
- thresholds,
- id_out
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-TAO_LogMgr_i::create_with_id_i (DsLogAdmin::LogId id,
- DsLogAdmin::LogFullActionType full_action,
- CORBA::ULongLong max_size,
- const DsLogAdmin::CapacityAlarmThresholdList* thresholds
- ACE_ENV_ARG_DECL)
-{
- // Validate log_full_action before creating log
- if (full_action != DsLogAdmin::wrap && full_action != DsLogAdmin::halt)
- ACE_THROW (DsLogAdmin::InvalidLogFullAction ());
-
- if (thresholds)
- {
- // @@ JTC - validate thresholds here
- }
-
- this->logstore_->create_with_id (id,
- full_action,
- max_size,
- thresholds
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-CORBA::ORB_ptr
-TAO_LogMgr_i::orb ()
-{
- return this->orb_.in ();
-}
-
-PortableServer::POA_ptr
-TAO_LogMgr_i::factory_poa ()
-{
- return this->factory_poa_.in ();
-}
-
-PortableServer::POA_ptr
-TAO_LogMgr_i::log_poa ()
-{
- return this->log_poa_.in ();
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/orbsvcs/orbsvcs/Log/LogMgr_i.h b/TAO/orbsvcs/orbsvcs/Log/LogMgr_i.h
deleted file mode 100644
index a75417898c8..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/LogMgr_i.h
+++ /dev/null
@@ -1,202 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file LogMgr_i.h
- *
- * $Id$
- *
- * Implementation of the DsLogAdmin::LogMgr interface.
- *
- * @author Matthew Braun <mjb2@cs.wustl.edu>
- * @author Pradeep Gore <pradeep@cs.wustl.edu>
- * @author David A. Hanvey <d.hanvey@qub.ac.uk>
- */
-//=============================================================================
-
-#ifndef TAO_TLS_LOGMGR_I_H
-#define TAO_TLS_LOGMGR_I_H
-#include /**/ "ace/pre.h"
-
-#include "orbsvcs/DsLogAdminS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "orbsvcs/Log/Log_i.h"
-#include "orbsvcs/Log/Log_Persistence_Strategy.h"
-#include "orbsvcs/Log/log_serv_export.h"
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-/**
- * @class TAO_LogMgr_i
- * @brief Log Factory
- *
- * The implementation delegates operations to a dynamically loaded
- * Strategy class.
- */
-class TAO_Log_Serv_Export TAO_LogMgr_i
- : public virtual POA_DsLogAdmin::LogMgr
-{
-public:
-
- // = Initialization and Termination Methods
-
- /// Constructor.
- TAO_LogMgr_i ();
-
- /// Destructor.
- virtual ~TAO_LogMgr_i ();
-
- /// Lists all log object references.
- DsLogAdmin::LogList *
- list_logs (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- /// Lists all log ids.
- DsLogAdmin::LogIdList *
- list_logs_by_id (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- /// Returns a reference to the log with the supplied id.
- DsLogAdmin::Log_ptr
- find_log (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- /// Returns true if log exists, otherwise false
- bool exists (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL);
-
- /// Remove the given entry from the container.
- int remove (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL);
-
- /// @brief Create ObjectId
- ///
- /// Create object id for log channel @ id.
- ///
- /// @param id log id
- ///
- /// @return object id
- ///
- virtual PortableServer::ObjectId*
- create_objectid (DsLogAdmin::LogId id);
-
- /// @brief Create log reference
- ///
- /// Create object reference for log channel @a id.
- ///
- /// @param id log id
- ///
- /// @return object reference
- ///
- virtual DsLogAdmin::Log_ptr
- create_log_reference (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL);
-
- /// @brief Create log object
- ///
- /// Create Log object for log channel @a id.
- ///
- /// @param id log id
- ///
- /// @return object reference
- ///
- virtual DsLogAdmin::Log_ptr
- create_log_object (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL);
-
- /// @brief Create log repository id
- ///
- /// Return repository id for log
- ///
- /// @return repository id
- ///
- virtual CORBA::RepositoryId
- create_repositoryid () = 0;
-
- /// @brief Create log servant
- ///
- /// Create Log servant for log channel @a id.
- ///
- /// @param id log id
- ///
- /// @return pointer to servant
- virtual PortableServer::ServantBase*
- create_log_servant (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL) = 0;
-
- /// @brief Get log record store
- ///
- /// Get/Create a log record store for log channel @a id.
- ///
- /// @param id log id
- ///
- TAO_LogRecordStore*
- get_log_record_store (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL);
-
- CORBA::ORB_ptr orb();
-
- PortableServer::POA_ptr factory_poa();
-
- PortableServer::POA_ptr log_poa();
-
-protected:
- /// @brief Initialize
- ///
- /// Creates factory and log channel POAs, and obtains the LogStore
- /// from a dynamically loaded Log_Persistence_Strategy (if one was
- /// specified in the service config file, otherwise the default
- /// Hash_Persistence_Strategy is used.)
- ///
- /// @param orb ORB
- /// @param poa Parent POA
- ///
- void init (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa
- ACE_ENV_ARG_DECL);
-
- /// @brief Create log
- void create_i (DsLogAdmin::LogFullActionType full_action,
- CORBA::ULongLong max_size,
- const DsLogAdmin::CapacityAlarmThresholdList* thresholds,
- DsLogAdmin::LogId_out id_out
- ACE_ENV_ARG_DECL);
-
- /// @brief Create log
- void create_with_id_i (DsLogAdmin::LogId id,
- DsLogAdmin::LogFullActionType full_action,
- CORBA::ULongLong max_size,
- const DsLogAdmin::CapacityAlarmThresholdList* thresholds
- ACE_ENV_ARG_DECL);
-
- /// ORB.
- CORBA::ORB_var orb_;
-
- /// POA.
- PortableServer::POA_var poa_;
-
- /// Factory POA.
- PortableServer::POA_var factory_poa_;
-
- /// Log POA.
- PortableServer::POA_var log_poa_;
-
-private:
- TAO_LogStore* logstore_;
-};
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#include /**/ "ace/post.h"
-#endif /* TAO_TLS_LOGMGR_I_H */
diff --git a/TAO/orbsvcs/orbsvcs/Log/LogNotification.cpp b/TAO/orbsvcs/orbsvcs/Log/LogNotification.cpp
deleted file mode 100644
index e7f422dd36b..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/LogNotification.cpp
+++ /dev/null
@@ -1,418 +0,0 @@
-#include "orbsvcs/Log/LogNotification.h"
-
-#include "orbsvcs/Time_Utilities.h"
-#include "tao/debug.h"
-#include "ace/OS_NS_sys_time.h"
-
-ACE_RCSID (Log,
- LogNotification,
- "$Id$")
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-TAO_LogNotification::TAO_LogNotification (void)
-{
-}
-
-TAO_LogNotification::~TAO_LogNotification (void)
-{
-}
-
-void
-TAO_LogNotification::object_creation (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-
- CORBA::Any any;
- DsLogNotification::ObjectCreation event;
-
- // The log id.
- event.id = id;
-
- TimeBase::TimeT current_time;
- ACE_Time_Value now = ACE_OS::gettimeofday ();
- ORBSVCS_Time::Time_Value_to_TimeT(current_time, now);
-
- event.time = current_time;
-
- any <<= event;
-
- this->send_notification (any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-TAO_LogNotification::object_deletion (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::Any any;
- DsLogNotification::ObjectDeletion event;
-
- event.id = id;
-
- TimeBase::TimeT current_time;
- ACE_Time_Value now = ACE_OS::gettimeofday ();
- ORBSVCS_Time::Time_Value_to_TimeT(current_time, now);
-
- // Time object deleted.
- event.time = current_time;
-
- any <<= event;
-
- this->send_notification (any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-TAO_LogNotification::processing_error_alarm (CORBA::ULong error_num,
- const char* error_string
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::Any any;
- DsLogNotification::ProcessingErrorAlarm event;
-
- event.error_num = error_num;
- event.error_string = CORBA::string_dup (error_string);
-
- any <<= event;
-
- this->send_notification (any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-TAO_LogNotification::attribute_value_change (DsLogAdmin::Log_ptr log,
- DsLogAdmin::LogId id,
- DsLogNotification::AttributeType type,
- CORBA::Any oldValue,
- CORBA::Any newValue
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::Any any;
- DsLogNotification::AttributeValueChange event;
-
- event.logref = DsLogAdmin::Log::_duplicate (log);
- event.id = id;
-
- TimeBase::TimeT current_time;
- ACE_Time_Value now = ACE_OS::gettimeofday ();
- ORBSVCS_Time::Time_Value_to_TimeT (current_time, now);
-
- event.time = current_time;
-
- // The attribute type e.g. logFullAction, maxLogSize etc.
- event.type = type;
- event.old_value = oldValue;
- event.new_value = newValue;
-
- any <<= event;
-
- this->send_notification (any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-TAO_LogNotification::capacity_alarm_threshold_value_change (
- DsLogAdmin::Log_ptr log,
- DsLogAdmin::LogId id,
- const DsLogAdmin::CapacityAlarmThresholdList& oldValue,
- const DsLogAdmin::CapacityAlarmThresholdList& newValue
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::Any oldV, newV;
- oldV <<= oldValue;
- newV <<= newValue;
-
- this->attribute_value_change (log,
- id,
- DsLogNotification::capacityAlarmThreshold,
- oldV,
- newV
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-TAO_LogNotification::log_full_action_value_change (DsLogAdmin::Log_ptr log,
- DsLogAdmin::LogId id,
- CORBA::ULong oldValue,
- CORBA::ULong newValue
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::Any oldV, newV;
- oldV <<= oldValue;
- newV <<= newValue;
-
- this->attribute_value_change (log,
- id,
- DsLogNotification::logFullAction,
- oldV,
- newV
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-TAO_LogNotification::max_log_size_value_change (DsLogAdmin::Log_ptr log,
- DsLogAdmin::LogId id,
- CORBA::ULongLong oldValue,
- CORBA::ULongLong newValue
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::Any oldV, newV;
- oldV <<= oldValue;
- newV <<= newValue;
-
- this->attribute_value_change (log,
- id,
- DsLogNotification::maxLogSize,
- oldV,
- newV
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-TAO_LogNotification::start_time_value_change (DsLogAdmin::Log_ptr log,
- DsLogAdmin::LogId id,
- DsLogAdmin::TimeT oldValue,
- DsLogAdmin::TimeT newValue
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::Any oldV, newV;
- oldV <<= oldValue;
- newV <<= newValue;
-
- this->attribute_value_change (log,
- id,
- DsLogNotification::startTime,
- oldV,
- newV
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-TAO_LogNotification::stop_time_value_change (DsLogAdmin::Log_ptr log,
- DsLogAdmin::LogId id,
- DsLogAdmin::TimeT oldValue,
- DsLogAdmin::TimeT newValue
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::Any oldV, newV;
- oldV <<= oldValue;
- newV <<= newValue;
-
- this->attribute_value_change (log,
- id,
- DsLogNotification::stopTime,
- oldV,
- newV
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-TAO_LogNotification::week_mask_value_change (DsLogAdmin::Log_ptr log,
- DsLogAdmin::LogId id,
- const DsLogAdmin::WeekMask& oldValue,
- const DsLogAdmin::WeekMask& newValue
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::Any oldV, newV;
- oldV <<= oldValue;
- newV <<= newValue;
-
- this->attribute_value_change (log,
- id,
- DsLogNotification::weekMask,
- oldV,
- newV
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-TAO_LogNotification::max_record_life_value_change (DsLogAdmin::Log_ptr log,
- DsLogAdmin::LogId id,
- CORBA::ULong oldValue,
- CORBA::ULong newValue
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::Any oldV, newV;
- oldV <<= oldValue;
- newV <<= newValue;
-
- this->attribute_value_change (log,
- id,
- DsLogNotification::maxRecordLife,
- oldV,
- newV
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-TAO_LogNotification::quality_of_service_value_change (
- DsLogAdmin::Log_ptr log,
- DsLogAdmin::LogId id,
- const DsLogAdmin::QoSList& oldValue,
- const DsLogAdmin::QoSList& newValue
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::Any oldV, newV;
- oldV <<= oldValue;
- newV <<= newValue;
-
- this->attribute_value_change (log,
- id,
- DsLogNotification::qualityOfService,
- oldV,
- newV
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-TAO_LogNotification::state_change (DsLogAdmin::Log_ptr log,
- DsLogAdmin::LogId id,
- DsLogNotification::StateType type,
- CORBA::Any newValue
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::Any any;
- DsLogNotification::StateChange event;
-
- event.logref = DsLogAdmin::Log::_duplicate (log);
- event.id = id;
-
- TimeBase::TimeT current_time;
- ACE_Time_Value now = ACE_OS::gettimeofday ();
- ORBSVCS_Time::Time_Value_to_TimeT (current_time, now);
- event.time = current_time;
-
- // Administrative, Operational or Forwarding state.
- event.type = type;
-
- event.new_value = newValue;
-
- any <<= event;
-
- this->send_notification (any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-TAO_LogNotification::administrative_state_change (
- DsLogAdmin::Log_ptr log,
- DsLogAdmin::LogId id,
- DsLogAdmin::AdministrativeState newValue
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::Any newV;
- newV <<= newValue;
-
- this->state_change (log,
- id,
- DsLogNotification::administrativeState,
- newV
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-TAO_LogNotification::operational_state_change (
- DsLogAdmin::Log_ptr log,
- DsLogAdmin::LogId id,
- DsLogAdmin::OperationalState newValue
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::Any newV;
- newV <<= newValue;
-
- this->state_change (log,
- id,
- DsLogNotification::operationalState,
- newV
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-TAO_LogNotification::forwarding_state_change (DsLogAdmin::Log_ptr log,
- DsLogAdmin::LogId id,
- DsLogAdmin::ForwardingState newValue
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::Any newV;
- newV <<= newValue;
-
- this->state_change (log,
- id,
- DsLogNotification::forwardingState,
- newV
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-TAO_LogNotification::threshold_alarm (
- DsLogAdmin::Log_ptr log,
- DsLogAdmin::LogId id,
- DsLogAdmin::Threshold crossedValue,
- DsLogAdmin::Threshold observedValue,
- DsLogNotification::PerceivedSeverityType severity
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::Any any;
- DsLogNotification::ThresholdAlarm event;
-
- event.logref = DsLogAdmin::Log::_duplicate (log);
- event.id = id;
-
- TimeBase::TimeT current_time;
- ACE_Time_Value now = ACE_OS::gettimeofday ();
- ORBSVCS_Time::Time_Value_to_TimeT(current_time, now);
- event.time = current_time;
-
- event.crossed_value = crossedValue;
- event.observed_value = observedValue;
- event.perceived_severity = severity;
-
- any <<= event;
-
- this->send_notification (any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-TAO_LogNotification::send_notification (const CORBA::Any & /* any */
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/orbsvcs/orbsvcs/Log/LogNotification.h b/TAO/orbsvcs/orbsvcs/Log/LogNotification.h
deleted file mode 100644
index 32b68ecae1f..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/LogNotification.h
+++ /dev/null
@@ -1,185 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file LogNotification.h
- *
- * $Id$
- *
- * Implementation of the DsLogAdmin::LogNotification interface.
- *
- * @author D A Hanvey <d.hanvey@qub.ac.uk>
- */
-//=============================================================================
-
-
-#ifndef TAO_TLS_LOG_NOTIFICATION_H
-#define TAO_TLS_LOG_NOTIFICATION_H
-
-#include /**/ "ace/pre.h"
-
-#include "orbsvcs/DsLogAdminS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "orbsvcs/DsLogNotificationS.h"
-#include "orbsvcs/Log/log_serv_export.h"
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-/**
- * @class TAO_LogNotification
- *
- * @brief Used to forward log generated events to a logging server
- *
- * This implementation attempts to conform to the telecom
- * logging specification.
- */
-class TAO_Log_Serv_Export TAO_LogNotification
-{
-
-public:
-
- /// Constructor.
- TAO_LogNotification (void);
-
- /// Destructor.
- virtual ~TAO_LogNotification (void);
-
- /// Event generated when a new log is created.
- void object_creation (DsLogAdmin::LogId id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Event generated when a new log is deleted.
- void object_deletion (DsLogAdmin::LogId id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Event generated.
- void processing_error_alarm (CORBA::ULong error_num, const char* error_string
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// AttributeValueChange event generation method.
- void attribute_value_change (DsLogAdmin::Log_ptr log,
- DsLogAdmin::LogId id,
- DsLogNotification::AttributeType type,
- CORBA::Any oldValue,
- CORBA::Any newValue ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// AttributeValueChange event generation method.
- void capacity_alarm_threshold_value_change (DsLogAdmin::Log_ptr log,
- DsLogAdmin::LogId id,
- const DsLogAdmin::CapacityAlarmThresholdList& oldValue,
- const DsLogAdmin::CapacityAlarmThresholdList& newValue
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// AttributeValueChange event generation method.
- void log_full_action_value_change (DsLogAdmin::Log_ptr log,
- DsLogAdmin::LogId id,
- CORBA::ULong oldValue,
- CORBA::ULong newValue
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// AttributeValueChange event generation method.
- void max_log_size_value_change (DsLogAdmin::Log_ptr log,
- DsLogAdmin::LogId id,
- CORBA::ULongLong oldValue,
- CORBA::ULongLong newValue
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// AttributeValueChange event generation method.
- void start_time_value_change (DsLogAdmin::Log_ptr log,
- DsLogAdmin::LogId id,
- DsLogAdmin::TimeT oldValue,
- DsLogAdmin::TimeT newValue
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// AttributeValueChange event generation method.
- void stop_time_value_change (DsLogAdmin::Log_ptr log,
- DsLogAdmin::LogId id,
- DsLogAdmin::TimeT oldValue,
- DsLogAdmin::TimeT newValue
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// AttributeValueChange event generation method.
- void week_mask_value_change (DsLogAdmin::Log_ptr log,
- DsLogAdmin::LogId id,
- const DsLogAdmin::WeekMask& oldValue,
- const DsLogAdmin::WeekMask& newValue
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// AttributeValueChange event generation method.
- void max_record_life_value_change (DsLogAdmin::Log_ptr log,
- DsLogAdmin::LogId id,
- CORBA::ULong oldValue,
- CORBA::ULong newValue
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// AttributeValueChange event generation method.
- void quality_of_service_value_change (DsLogAdmin::Log_ptr log,
- DsLogAdmin::LogId id,
- const DsLogAdmin::QoSList& oldValue,
- const DsLogAdmin::QoSList& newValue
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// StateChange event generation method.
- void state_change (DsLogAdmin::Log_ptr log,
- DsLogAdmin::LogId id,
- DsLogNotification::StateType type,
- CORBA::Any newValue
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// StateChange event generation method.
- void administrative_state_change (DsLogAdmin::Log_ptr log,
- DsLogAdmin::LogId id,
- DsLogAdmin::AdministrativeState newValue
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// StateChange event generation method.
- void operational_state_change (DsLogAdmin::Log_ptr log,
- DsLogAdmin::LogId id,
- DsLogAdmin::OperationalState newValue
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// StateChange event generation method.
- void forwarding_state_change (DsLogAdmin::Log_ptr log,
- DsLogAdmin::LogId id,
- DsLogAdmin::ForwardingState newValue
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// StateChange event generation method.
- void threshold_alarm (DsLogAdmin::Log_ptr log,
- DsLogAdmin::LogId id,
- DsLogAdmin::Threshold crossedValue,
- DsLogAdmin::Threshold observedValue,
- DsLogNotification::PerceivedSeverityType severity
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Method overriden by by event-aware logging services to cause
- /// a notification event to be sent.
- virtual void send_notification (const CORBA::Any &
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-};
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#include /**/ "ace/post.h"
-
-#endif /* TAO_TLS_LOG_NOTIFICATION_H */
diff --git a/TAO/orbsvcs/orbsvcs/Log/LogRecordStore.cpp b/TAO/orbsvcs/orbsvcs/Log/LogRecordStore.cpp
deleted file mode 100644
index 278039ac40e..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/LogRecordStore.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-#include "orbsvcs/Log/LogRecordStore.h"
-
-ACE_RCSID (Log,
- LogRecordStore,
- "$Id$")
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-TAO_LogRecordStore::TAO_LogRecordStore (void)
-{
-}
-
-TAO_LogRecordStore::~TAO_LogRecordStore (void)
-{
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/orbsvcs/orbsvcs/Log/LogRecordStore.h b/TAO/orbsvcs/orbsvcs/Log/LogRecordStore.h
deleted file mode 100644
index 4e630b0ea46..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/LogRecordStore.h
+++ /dev/null
@@ -1,269 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file LogRecordStore.h
- *
- * $Id$
- *
- * @author Matthew Braun <mjb2@cs.wustl.edu>
- * @author Pradeep Gore <pradeep@cs.wustl.edu>
- * @author David A. Hanvey <d.hanvey@qub.ac.uk>
- */
-//=============================================================================
-
-#ifndef TAO_LOG_RECORD_STORE_H
-#define TAO_LOG_RECORD_STORE_H
-
-#include /**/ "ace/pre.h"
-#include /**/ "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "orbsvcs/DsLogAdminC.h"
-#include "orbsvcs/Log/log_serv_export.h"
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-/**
- * @class TAO_LogRecordStore
- *
- * @brief Abstract base class for storing DsLogAdmin::LogRecord's
- *
- * Implements a Table Data Gateway(144) for log records, and a Row
- * Data Gateway(152) for log channel parameters.
- */
-class TAO_Log_Serv_Export TAO_LogRecordStore
-{
- public:
-
- // = Initialization and termination methods
-
- /// Destructor.
- virtual ~TAO_LogRecordStore (void);
-
- /// Initialization.
- virtual int open (void) = 0;
-
- /// Close the record store.
- virtual int close (void) = 0;
-
-
- // = Log Parameters
-
- /// Gets the administrative state of the log
- virtual DsLogAdmin::AdministrativeState
- get_administrative_state (ACE_ENV_SINGLE_ARG_DECL) const = 0;
-
- /// Sets the administrative state of the log
- virtual void
- set_administrative_state (DsLogAdmin::AdministrativeState state
- ACE_ENV_ARG_DECL) = 0;
-
- /// Get the capacity alarm thresholds
- virtual DsLogAdmin::CapacityAlarmThresholdList*
- get_capacity_alarm_thresholds (ACE_ENV_SINGLE_ARG_DECL) const = 0;
-
- /// Set the capacity alarm thresholds
- virtual void
- set_capacity_alarm_thresholds (const DsLogAdmin::CapacityAlarmThresholdList& thresholds
- ACE_ENV_ARG_DECL) = 0;
-
- /// Gets the forwarding state
- virtual DsLogAdmin::ForwardingState
- get_forwarding_state (ACE_ENV_SINGLE_ARG_DECL) const = 0;
-
- /// Sets the forwarding state
- virtual void
- set_forwarding_state (DsLogAdmin::ForwardingState state
- ACE_ENV_ARG_DECL) = 0;
-
- /// Get the log duration
- virtual DsLogAdmin::TimeInterval
- get_interval (ACE_ENV_SINGLE_ARG_DECL) const = 0;
-
- /// Set the log duration.
- virtual void
- set_interval (const DsLogAdmin::TimeInterval& interval
- ACE_ENV_ARG_DECL) = 0;
-
- /// Get the log full action
- virtual DsLogAdmin::LogFullActionType
- get_log_full_action (ACE_ENV_SINGLE_ARG_DECL) const = 0;
-
- /// Set the log full action
- virtual void
- set_log_full_action(DsLogAdmin::LogFullActionType action
- ACE_ENV_ARG_DECL) = 0;
-
- /// Get the list of the QoS properties supported by the log.
- virtual DsLogAdmin::QoSList*
- get_log_qos (ACE_ENV_SINGLE_ARG_DECL) const = 0;
-
- /// Set the list of the QoS properties supported by the log.
- virtual void
- set_log_qos (const DsLogAdmin::QoSList& qos
- ACE_ENV_ARG_DECL) = 0;
-
- /// Gets the max record life
- virtual CORBA::ULong
- get_max_record_life (ACE_ENV_SINGLE_ARG_DECL) const = 0;
-
- /// Sets the max record life
- virtual void
- set_max_record_life (CORBA::ULong life
- ACE_ENV_ARG_DECL) = 0;
-
- /// Get the current set value of the max size of the log data.
- virtual CORBA::ULongLong
- get_max_size (ACE_ENV_SINGLE_ARG_DECL) const = 0;
-
- /// Set the max size of log data. size == 0, => infinite.
- virtual void
- set_max_size (CORBA::ULongLong size
- ACE_ENV_ARG_DECL) = 0;
-
- /// Get the weekly scheduling parameters
- virtual DsLogAdmin::WeekMask*
- get_week_mask (ACE_ENV_SINGLE_ARG_DECL) = 0;
-
- /// Set the weekly scheduling parameters.
- virtual void
- set_week_mask (const DsLogAdmin::WeekMask& masks
- ACE_ENV_ARG_DECL) = 0;
-
-
- // = LogRecordStore status methods
-
- /// Gets the current size of the log data.
- virtual CORBA::ULongLong
- get_current_size (ACE_ENV_SINGLE_ARG_DECL) = 0;
-
- /// Get the number of records in the log right now.
- virtual CORBA::ULongLong
- get_n_records (ACE_ENV_SINGLE_ARG_DECL) = 0;
-
-
- // = LogRecordStore gauge
-
- /// Gets the current value of the "gauge" that measures the total
- /// size of the records written to the log.
- virtual CORBA::ULongLong
- get_gauge(ACE_ENV_SINGLE_ARG_DECL) = 0;
-
- /// Resets the "gauge" to 0
- virtual void
- reset_gauge(ACE_ENV_SINGLE_ARG_DECL) = 0;
-
-
- // = Record logging, retrieval, update and removal methods.
-
- /// Insert rec into storage.
- /// Returns 0 on success -1 on failure and 1 if the log is full.
- virtual int
- log (const DsLogAdmin::LogRecord &rec ACE_ENV_ARG_DECL) = 0;
-
- /// Deletes "old" records from the store.
- virtual int
- purge_old_records (ACE_ENV_SINGLE_ARG_DECL) = 0;
-
- /// Set single record attributes.
- virtual void
- set_record_attribute (DsLogAdmin::RecordId id,
- const DsLogAdmin::NVList & attr_list
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidRecordId,
- DsLogAdmin::InvalidAttribute)) = 0;
-
- /// Set the attributes of all records that matches the
- /// constraints with same attr_list.
- virtual CORBA::ULong
- set_records_attribute (const char * grammar,
- const char * c,
- const DsLogAdmin::NVList & attr_list
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidGrammar,
- DsLogAdmin::InvalidConstraint,
- DsLogAdmin::InvalidAttribute)) = 0;
-
- /// Get the attributes of the record with id <id>. Raises
- /// DsLogAdmin::InvalidRecordId
- virtual DsLogAdmin::NVList*
- get_record_attribute (DsLogAdmin::RecordId id
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidRecordId)) = 0;
-
- /// Ensure changes have been flushed to persistent media
- /// Returns 0 on success, -1 on failure
- virtual int
- flush (ACE_ENV_SINGLE_ARG_DECL) = 0;
-
-
- /// Returns all records in the log that match the given constraint
- /// <c>.
- virtual DsLogAdmin::RecordList*
- query (const char * grammar,
- const char * c,
- DsLogAdmin::Iterator_out i
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidGrammar,
- DsLogAdmin::InvalidConstraint)) = 0;
-
- /// Retrieve <how_many> records from time <from_time> using iterator
- /// <i>.
- virtual DsLogAdmin::RecordList*
- retrieve (DsLogAdmin::TimeT from_time,
- CORBA::Long how_many,
- DsLogAdmin::Iterator_out i
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
-
- /// Returns the number of records matching constraint <c>.
- virtual CORBA::ULong
- match (const char * grammar,
- const char * c
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidGrammar,
- DsLogAdmin::InvalidConstraint)) = 0;
-
- /// Delete records matching constraint <c>.
- virtual CORBA::ULong
- delete_records (const char * grammar,
- const char * c
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidGrammar,
- DsLogAdmin::InvalidConstraint)) = 0;
-
- /// Delete records matching ids in <ids>
- virtual CORBA::ULong
- delete_records_by_id (const DsLogAdmin::RecordIdList & ids
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
-
-
- virtual CORBA::ULong
- remove_old_records (ACE_ENV_SINGLE_ARG_DECL) = 0;
-
- /// Read-Write Lock
- virtual ACE_SYNCH_RW_MUTEX& lock() = 0;
-
-protected:
- /// Constructor.
- TAO_LogRecordStore (void);
-
-
-private:
-};
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#include /**/ "ace/post.h"
-#endif /*TAO_LOG_RECORD_STORE_H*/
diff --git a/TAO/orbsvcs/orbsvcs/Log/LogStore.h b/TAO/orbsvcs/orbsvcs/Log/LogStore.h
deleted file mode 100644
index 78773abffb9..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/LogStore.h
+++ /dev/null
@@ -1,108 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file LogStore.h
- *
- * $Id$
- *
- * @author Matthew Braun <mjb2@cs.wustl.edu>
- * @author Pradeep Gore <pradeep@cs.wustl.edu>
- * @author David A. Hanvey <d.hanvey@qub.ac.uk>
- */
-//=============================================================================
-
-#ifndef TAO_TLS_LOGSTORE_H
-#define TAO_TLS_LOGSTORE_H
-
-#include /**/ "ace/pre.h"
-#include /**/ "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "orbsvcs/DsLogAdminC.h"
-#include "orbsvcs/Log/log_serv_export.h"
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-class TAO_LogRecordStore;
-
-class TAO_Log_Serv_Export TAO_LogStore
-{
-public:
- // Destructor
- virtual ~TAO_LogStore() {}
-
- /// Lists all logs created by the log factory.
- virtual DsLogAdmin::LogList *
- list_logs (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- )) = 0;
-
- /// Lists all log ids.
- virtual DsLogAdmin::LogIdList *
- list_logs_by_id (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- )) = 0;
-
- /// Returns a reference to the log with the supplied id.
- virtual DsLogAdmin::Log_ptr
- find_log (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- )) = 0;
-
- /// Returns true if log exists, otherwise false
- virtual bool
- exists (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL) = 0;
-
- /// Remove the given entry from the hash table.
- virtual int
- remove (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL) = 0;
-
- /// @brief Create log
- virtual void
- create (DsLogAdmin::LogFullActionType full_action,
- CORBA::ULongLong max_size,
- const DsLogAdmin::CapacityAlarmThresholdList* thresholds,
- DsLogAdmin::LogId_out id_out
- ACE_ENV_ARG_DECL) = 0;
-
- /// @brief Create log
- virtual void
- create_with_id (DsLogAdmin::LogId id,
- DsLogAdmin::LogFullActionType full_action,
- CORBA::ULongLong max_size,
- const DsLogAdmin::CapacityAlarmThresholdList* thresholds
- ACE_ENV_ARG_DECL) = 0;
-
- /// @brief Get log record store
- ///
- /// Get/Create a log record store for log channel @a id.
- ///
- /// @param id log id
- ///
- virtual TAO_LogRecordStore*
- get_log_record_store (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL) = 0;
-
-protected:
- // Constructor
- TAO_LogStore() {}
-
-
-private:
-};
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#include /**/ "ace/post.h"
-
-#endif /* TAO_TLS_LOGSTORE_H */
diff --git a/TAO/orbsvcs/orbsvcs/Log/Log_Compaction_Handler.cpp b/TAO/orbsvcs/orbsvcs/Log/Log_Compaction_Handler.cpp
deleted file mode 100644
index d153bbe2714..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/Log_Compaction_Handler.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-#include "orbsvcs/Log/Log_Compaction_Handler.h"
-#include "orbsvcs/Log/Log_i.h"
-#include "ace/Reactor.h"
-
-ACE_RCSID (Log,
- Log_Compaction_Handler,
- "$Id$")
-
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-TAO_Log_Compaction_Handler::TAO_Log_Compaction_Handler (ACE_Reactor* reactor,
- TAO_Log_i* log,
- const ACE_Time_Value& interval)
- : timer_id_(-1),
- reactor_(reactor),
- log_(log),
- interval_(interval)
-{
-}
-
-
-TAO_Log_Compaction_Handler::~TAO_Log_Compaction_Handler ()
-{
- this->cancel ();
-}
-
-
-void
-TAO_Log_Compaction_Handler::schedule ()
-{
- this->cancel ();
- this->timer_id_ =
- this->reactor_->schedule_timer (this, 0, this->interval_, this->interval_);
-}
-
-
-void
-TAO_Log_Compaction_Handler::cancel ()
-{
- if (this->timer_id_ != -1)
- {
- this->reactor_->cancel_timer (timer_id_);
- this->timer_id_ = -1;
- }
-}
-
-
-int
-TAO_Log_Compaction_Handler::handle_timeout (const ACE_Time_Value&,
- const void *)
-{
- ACE_TRY_NEW_ENV
- {
- this->log_->remove_old_records(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/orbsvcs/orbsvcs/Log/Log_Compaction_Handler.h b/TAO/orbsvcs/orbsvcs/Log/Log_Compaction_Handler.h
deleted file mode 100644
index 3e51de61602..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/Log_Compaction_Handler.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Log_Compaction_Handler.h
- *
- * $Id$
- *
- */
-//=============================================================================
-
-#ifndef TAO_TLS_COMPACTION_HANDLER_H
-#define TAO_TLS_COMPACTION_HANDLER_H
-
-#include "orbsvcs/Log/log_serv_export.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/Versioned_Namespace.h"
-
-#include "ace/Event_Handler.h"
-#include "ace/Time_Value.h"
-
-ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-class ACE_Reactor;
-ACE_END_VERSIONED_NAMESPACE_DECL
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-class TAO_Log_i;
-
-/// @class TAO_Log_Compaction_Handler
-/// @brief Periodically invoke remove_old_records() on Log
-///
-class TAO_Log_Serv_Export TAO_Log_Compaction_Handler
- : public ACE_Event_Handler
-{
-public:
- /// Constructor.
- TAO_Log_Compaction_Handler (ACE_Reactor* reactor,
- TAO_Log_i* log,
- const ACE_Time_Value& interval);
-
- /// Destructor.
- ~TAO_Log_Compaction_Handler ();
-
- /// Schedule Timer.
- void schedule ();
-
- /// Cancel Timer.
- void cancel ();
-
- virtual int handle_timeout (const ACE_Time_Value &tv, const void *arg);
-
-private:
- long timer_id_;
- ACE_Reactor* reactor_;
- TAO_Log_i* log_;
- const ACE_Time_Value interval_;
-};
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#endif /* TAO_LOG_COMPACTION_HANDLER_H */
diff --git a/TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Interpreter.cpp b/TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Interpreter.cpp
deleted file mode 100644
index e741de09004..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Interpreter.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-#include "orbsvcs/Log/Log_Constraint_Interpreter.h"
-
-#include "orbsvcs/Log/Log_Constraint_Visitors.h"
-
-ACE_RCSID (Log,
- Log_Constraint_Interpreter,
- "$Id$")
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-TAO_Log_Constraint_Interpreter::TAO_Log_Constraint_Interpreter (
- const char *constraints
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((DsLogAdmin::InvalidConstraint,
- CORBA::NO_MEMORY))
-{
- if (TAO_ETCL_Interpreter::is_empty_string (constraints))
- {
- // Root is deleted in the TAO_Interpreter's destructor.
- ACE_NEW_THROW_EX (this->root_,
- TAO_ETCL_Literal_Constraint ((CORBA::Boolean) 1),
- CORBA::NO_MEMORY ());
- ACE_CHECK;
- }
- else
- {
- // root_ is set in this base class call.
- if (TAO_ETCL_Interpreter::build_tree (constraints) != 0)
- ACE_THROW (DsLogAdmin::InvalidConstraint ());
- }
-}
-
-TAO_Log_Constraint_Interpreter::~TAO_Log_Constraint_Interpreter (void)
-{
-}
-
-CORBA::Boolean
-TAO_Log_Constraint_Interpreter::evaluate (
- TAO_Log_Constraint_Visitor &evaluator
- )
-{
- CORBA::Boolean retval =
- evaluator.evaluate_constraint (this->root_);
-
- return retval;
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Interpreter.h b/TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Interpreter.h
deleted file mode 100644
index 18f754d8c79..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Interpreter.h
+++ /dev/null
@@ -1,70 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Log_Constraint_Interpreter.h
- *
- * $Id$
- *
- *
- *
- *
- * @author Pradeep Gore <pradeep@cs.wustl.edu>
- * @author D A Hanvey <d.hanvey@qub.ac.uk>
- *
- */
-//=============================================================================
-
-#ifndef TAO_LOG_CONSTRAINT_INTERPRETER_H
-#define TAO_LOG_CONSTRAINT_INTERPRETER_H
-
-#include /**/ "ace/pre.h"
-#include "orbsvcs/ETCL/ETCL_Interpreter.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "orbsvcs/ETCL/ETCL_Constraint.h"
-#include "orbsvcs/DsLogAdminC.h"
-#include "orbsvcs/Log/log_serv_export.h"
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-class TAO_Log_Constraint_Visitor;
-
-/**
- * @class TAO_Log_Constraint_Interpreter
- *
- * @brief "ETCL" Interpreter for the Log queries.
- */
-class TAO_Log_Serv_Export TAO_Log_Constraint_Interpreter :
- public TAO_ETCL_Interpreter
-{
-public:
-
- // = Initialization and termination methods.
-
- /**
- * This constructor builds an expression tree representing the
- * constraint specified in <constraints>, and throws an Illegal
- * Constraint exception if the constraint given has syntax errors or
- * semantic errors, such as mismatched types.
- */
- TAO_Log_Constraint_Interpreter (const char* constraints
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((DsLogAdmin::InvalidConstraint,
- CORBA::NO_MEMORY));
-
- /// Destructor.
- ~TAO_Log_Constraint_Interpreter (void);
-
- /// Returns true if the constraint is evaluated successfully by
- /// the evaluator.
- CORBA::Boolean evaluate (TAO_Log_Constraint_Visitor &evaluator);
-};
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#include /**/ "ace/post.h"
-#endif /* TAO_LOG_CONSTRAINT_INTERPRETER_H */
diff --git a/TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Visitors.cpp b/TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Visitors.cpp
deleted file mode 100644
index 9d8fe567d40..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Visitors.cpp
+++ /dev/null
@@ -1,1347 +0,0 @@
-#include "orbsvcs/Log/Log_Constraint_Visitors.h"
-
-#include "orbsvcs/ETCL/ETCL_Constraint.h"
-#include "orbsvcs/ETCL/ETCL_y.h"
-
-#include "tao/DynamicAny/DynArray_i.h"
-#include "tao/DynamicAny/DynSequence_i.h"
-#include "tao/DynamicAny/DynStruct_i.h"
-#include "tao/DynamicAny/DynUnion_i.h"
-#include "tao/DynamicAny/DynEnum_i.h"
-#include "tao/DynamicAny/DynAnyFactory.h"
-
-#include "tao/AnyTypeCode/Any_Unknown_IDL_Type.h"
-#include "tao/CDR.h"
-
-ACE_RCSID (Log,
- Log_Constraint_Visitors,
- "$Id$")
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-TAO_Log_Constraint_Visitor::TAO_Log_Constraint_Visitor (const DsLogAdmin::LogRecord &rec)
- : property_lookup_ (property_lookup_size_)
-{
- CORBA::Any val_id;
-#if defined (ACE_LACKS_LONGLONG_T) || defined (ACE_LACKS_UNSIGNEDLONGLONG_T)
- val_id <<= ACE_U64_TO_U32 (rec.id);
-#else
- val_id <<= static_cast<ACE_UINT32> (rec.id);
-#endif
- this->property_lookup_.bind (ACE_CString("id", 0, 0), val_id);
-
-
- CORBA::Any val_time;
-#if defined (ACE_LACKS_LONGLONG_T) || defined (ACE_LACKS_UNSIGNEDLONGLONG_T)
- val_time <<= ACE_U64_TO_U32 (rec.time);
-#else
- val_time <<= static_cast<ACE_UINT32> (rec.time);
-#endif
- this->property_lookup_.bind (ACE_CString("time", 0, 0), val_time);
-
- this->property_lookup_.bind (ACE_CString("info", 0, 0), rec.info);
-
- // Bind an entry for each item in the record's attribute list.
- CORBA::Long len = rec.attr_list.length();
- for (CORBA::Long i = 0; i < len; ++i)
- {
- this->property_lookup_.bind (ACE_CString(rec.attr_list[i].name,
- 0,
- 0),
- rec.attr_list[i].value);
- }
-}
-
-CORBA::Boolean
-TAO_Log_Constraint_Visitor::evaluate_constraint (TAO_ETCL_Constraint* root)
-{
- CORBA::Boolean result = 0;
- this->queue_.reset ();
-
- // Evaluate the constraint in root_;
- if (root != 0)
- {
- if ((root->accept (this) == 0) &&
- (! this->queue_.is_empty ()))
- {
- TAO_ETCL_Literal_Constraint top;
- this->queue_.dequeue_head (top);
- result = (CORBA::Boolean) top;
- }
- }
-
- // If a property couldn't be evaluated we must return 0.
- return result;
-}
-
-int
-TAO_Log_Constraint_Visitor::visit_literal (
- TAO_ETCL_Literal_Constraint *literal
- )
-{
- this->queue_.enqueue_head (*literal);
- return 0;
-}
-
-int
-TAO_Log_Constraint_Visitor::visit_identifier (TAO_ETCL_Identifier *ident)
-{
- int return_value = -1;
- const char *name = ident->value ();
- ACE_CString key (name, 0, 0);
-
- CORBA::Any any;
-
- if (this->property_lookup_.find (key, any) == 0)
- {
- if (any.impl() != 0)
- {
- this->queue_.enqueue_head (TAO_ETCL_Literal_Constraint (&any));
- return_value = 0;
- }
- }
-
- return return_value;
-}
-
-int
-TAO_Log_Constraint_Visitor::visit_union_value (
- TAO_ETCL_Union_Value *union_value
- )
-{
- switch (union_value->sign ())
- {
- case 0:
- this->queue_.enqueue_head (*union_value->string ());
- break;
- case -1:
- this->queue_.enqueue_head (-(*union_value->integer ()));
- break;
- case 1:
- this->queue_.enqueue_head (*union_value->integer ());
- break;
- default:
- return -1;
- }
-
- return 0;
-}
-
-int
-TAO_Log_Constraint_Visitor::visit_union_pos (
- TAO_ETCL_Union_Pos *union_pos
- )
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- if (union_pos->union_value ()->accept (this) == 0)
- {
- TAO_ETCL_Literal_Constraint disc_val;
- this->queue_.dequeue_head (disc_val);
-
- TAO_DynUnion_i dyn_union;
- dyn_union.init (this->current_member_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::TypeCode_var tc = this->current_member_->type ();
-
- switch (disc_val.expr_type ())
- {
- case TAO_ETCL_INTEGER:
- case TAO_ETCL_SIGNED:
- case TAO_ETCL_UNSIGNED:
- {
- CORBA::Any disc_any;
- CORBA::TypeCode_var disc_tc =
- tc->discriminator_type (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- CORBA::TCKind disc_kind =
- TAO_DynAnyFactory::unalias (disc_tc.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- switch (disc_kind)
- {
- case CORBA::tk_boolean:
- disc_any <<= CORBA::Any::from_boolean ((CORBA::Boolean) disc_val);
- break;
- case CORBA::tk_short:
- disc_any <<= (CORBA::Short) ((CORBA::Long) disc_val);
- break;
- case CORBA::tk_ushort:
- disc_any <<= (CORBA::UShort) ((CORBA::ULong) disc_val);
- break;
- case CORBA::tk_long:
- disc_any <<= (CORBA::Long) disc_val;
- break;
- case CORBA::tk_ulong:
- disc_any <<= (CORBA::ULong) disc_val;
- break;
- case CORBA::tk_enum:
- {
- TAO_OutputCDR cdr;
- cdr.write_ulong ((CORBA::ULong) disc_val);
- TAO_InputCDR in_cdr (cdr);
- TAO::Unknown_IDL_Type *unk = 0;
- ACE_NEW_RETURN (unk,
- TAO::Unknown_IDL_Type (
- disc_tc.in (),
- in_cdr
- ),
- -1);
-
- disc_any.replace (unk);
- break;
- }
- // @@@ (JP) I don't think ETCL handles 64-bit
- // integers at this point, and I also think that
- // chars and/or wchars will just come out in the
- // constraint as (w)strings of length 1.
- case CORBA::tk_longlong:
- case CORBA::tk_ulonglong:
- case CORBA::tk_char:
- case CORBA::tk_wchar:
- default:
- return -1;
- }
-
- DynamicAny::DynAny_var dyn_any =
- TAO_DynAnyFactory::make_dyn_any (disc_any
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- dyn_union.set_discriminator (dyn_any.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- DynamicAny::DynAny_var u_member =
- dyn_union.member (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- this->current_member_ =
- u_member->to_any (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- break;
- }
- case TAO_ETCL_STRING:
- {
- const char *name = (const char *) disc_val;
- CORBA::ULong count =
- tc->member_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- const char *member_name = 0;
- CORBA::ULong i = 0;
-
- for (i = 0; i < count; ++i)
- {
- member_name = tc->member_name (i
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (ACE_OS::strcmp (name, member_name) == 0)
- {
- break;
- }
- }
-
- // If there's no match, member_label will throw
- // CORBA::TypeCode::Bounds and the catch block will
- // return -1;
- this->current_member_ = tc->member_label (i
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- break;
- }
- // The TAO_ETCL_Union_Value that was put on the queue
- // shouldn't have any other type.
- default:
- return -1;
- }
-
- TAO_ETCL_Constraint *nested = union_pos->component ();
-
- // If there's no nested component, then we just want the
- // union member value on the queue. Otherwise, we want
- // the member value in current_member_ while we visit
- // the nested component.
- if (nested == 0)
- {
- TAO_ETCL_Literal_Constraint lit (this->current_member_.ptr ());
- this->queue_.enqueue_head (lit);
- return 0;
- }
- else
- {
- return nested->accept (this);
- }
- }
- else
- {
- return -1;
- }
- }
- ACE_CATCHANY
- {
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-}
-
-int
-TAO_Log_Constraint_Visitor::visit_component_pos (TAO_ETCL_Component_Pos *pos)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- // If we are here (from visit_component) the Any containing the
- // component as found in property_lookup_ will be in current_member_.
- CORBA::TypeCode_var tc = this->current_member_->type ();
- CORBA::TCKind kind = TAO_DynAnyFactory::unalias (tc.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- DynamicAny::DynAny_var member;
- CORBA::Boolean success = 0;
- CORBA::ULong slot = (CORBA::ULong) *pos->integer ();
-
- switch (kind)
- {
- case CORBA::tk_enum:
- {
- TAO_DynEnum_i dyn_enum;
- dyn_enum.init (this->current_member_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- success = dyn_enum.seek (slot
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (success == 0)
- {
- return -1;
- }
-
- member =
- dyn_enum.current_component (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- break;
- }
- case CORBA::tk_struct:
- {
- TAO_DynStruct_i dyn_struct;
- dyn_struct.init (this->current_member_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- success = dyn_struct.seek (slot
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (success == 0)
- {
- return -1;
- }
-
- member = dyn_struct.current_component (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- break;
- }
- // @@@ (JP) I think enums and structs are the only two cases handled
- // by Component_Pos, since arrays and sequences are handled by
- // Component_Array, and unions are handled by Union_Pos.
- default:
- return -1;
- }
-
- CORBA::Any_var value = member->to_any (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TAO_ETCL_Constraint *comp = pos->component ();
-
- if (comp == 0)
- {
- TAO_ETCL_Literal_Constraint result (value.ptr ());
- this->queue_.enqueue_head (result);
- return 0;
- }
- else
- {
- this->current_member_ = value._retn ();
- return comp->accept (this);
- }
- }
- ACE_CATCHANY
- {
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-}
-
-int
-TAO_Log_Constraint_Visitor::visit_component_assoc (
- TAO_ETCL_Component_Assoc *assoc)
-{
- // @@@ (JP) The spec reserves this type of constraint for NVLists.
- // Since NVLists don't have type codes or Any operators, there's
- // no way that TAO can put one into the event's filterable data.
- // However, from the looks of the ETCL grammar, I believe that a
- // contruct like 'exist $(foo)' is legal, and is in effect using
- // the event's filterable data as one big NVList. It is
- // equivalent to '$.foo'. I've implemented this method on that
- // basis, while keeping in mind that a clearer interpretation of
- // the spec may come along someday.
-
- CORBA::Any any;
- ACE_CString key (assoc->identifier ()->value (),
- 0,
- 0);
-
- if (this->property_lookup_.find (key, any) != 0
- || any.impl () == 0)
- {
- return -1;
- }
-
- TAO_ETCL_Constraint *comp = assoc->component ();
- CORBA::Any *any_ptr = 0;
-
- if (comp == 0)
- {
- TAO_ETCL_Literal_Constraint result (&any);
- this->queue_.enqueue_head (result);
- return 0;
- }
-
- ACE_NEW_RETURN (any_ptr,
- CORBA::Any (any),
- -1);
- this->current_member_ = any_ptr;
- return comp->accept (this);
-}
-
-int
-TAO_Log_Constraint_Visitor::visit_component_array (
- TAO_ETCL_Component_Array *array
- )
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- // If we are here (from visit_component) the Any containing the
- // component as found in property_lookup_ will be in current_member_.
- CORBA::TypeCode_var tc = this->current_member_->type ();
- CORBA::TCKind kind = TAO_DynAnyFactory::unalias (tc.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- DynamicAny::DynAny_var member;
- CORBA::Boolean success = 0;
- CORBA::ULong slot = (CORBA::ULong) *array->integer ();
-
- switch (kind)
- {
- case CORBA::tk_array:
- {
- TAO_DynEnum_i dyn_array;
- dyn_array.init (this->current_member_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- success = dyn_array.seek (slot
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (success == 0)
- {
- return -1;
- }
-
- member = dyn_array.current_component (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- break;
- }
- case CORBA::tk_sequence:
- {
- TAO_DynStruct_i dyn_sequence;
- dyn_sequence.init (this->current_member_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- success = dyn_sequence.seek (slot
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (success == 0)
- {
- return -1;
- }
-
- member =
- dyn_sequence.current_component (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- break;
- }
- // Enums and sequences are the only two cases handled
- // by Component_Array.
- default:
- return -1;
- }
-
- CORBA::Any_var value = member->to_any (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TAO_ETCL_Constraint *comp = array->component ();
-
- if (comp == 0)
- {
- TAO_ETCL_Literal_Constraint result (value.ptr ());
- this->queue_.enqueue_head (result);
- return 0;
- }
- else
- {
- this->current_member_ = value._retn ();
- return comp->accept (this);
- }
- }
- ACE_CATCHANY
- {
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-}
-
-int
-TAO_Log_Constraint_Visitor::visit_special (TAO_ETCL_Special *special)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- CORBA::TypeCode_var tc = this->current_member_->type ();
-
- switch (special->type ())
- {
- case TAO_ETCL_LENGTH:
- {
- // If the TCKind is not a sequence or an array, the
- // call to length() will raise an exception, and the
- // catch block will return -1;
- CORBA::ULong length = tc->length (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TAO_ETCL_Literal_Constraint lit (length);
- this->queue_.enqueue_head (lit);
- return 0;
- }
- case TAO_ETCL_DISCRIMINANT:
- {
- // If the TCKind is not a union, the
- // call to init() will raise an exception, and the
- // catch block will return -1;
- TAO_DynUnion_i dyn_union;
- dyn_union.init (this->current_member_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- DynamicAny::DynAny_var disc =
- dyn_union.get_discriminator (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Any_var disc_any = disc->to_any (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TAO_ETCL_Literal_Constraint lit (disc_any.ptr ());
- this->queue_.enqueue_head (lit);
- return 0;
- }
- case TAO_ETCL_TYPE_ID:
- {
- const char *name = tc->name (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TAO_ETCL_Literal_Constraint lit (name);
- this->queue_.enqueue_head (lit);
- return 0;
- }
- case TAO_ETCL_REPOS_ID:
- {
- const char *id = tc->id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TAO_ETCL_Literal_Constraint lit (id);
- this->queue_.enqueue_head (lit);
- return 0;
- }
- default:
- return -1;
- }
- }
- ACE_CATCHANY
- {
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-}
-
-int
-TAO_Log_Constraint_Visitor::visit_component (
- TAO_ETCL_Component *component
- )
-{
- // If this component has no sub-component, only an identifier,
- // then we just visit the identifier, which puts a literal on
- // the queue to be handled upon returning from this method call.
- // If there is a sub-component, we store the literal's value
- // in our member _var for possible examination at a more
- // nested level, and visit the sub-component.
-
- TAO_ETCL_Constraint *nested = component->component ();
- int result = component->identifier ()->accept (this);
-
- if (nested == 0 || result != 0)
- {
- return result;
- }
- else
- {
- TAO_ETCL_Literal_Constraint id;
- this->queue_.dequeue_head (id);
- CORBA::Any *any_ptr = 0;
- ACE_NEW_RETURN (any_ptr,
- CORBA::Any (*(const CORBA::Any *) id),
- -1);
- this->current_member_ = any_ptr;
- return nested->accept (this);
- }
-}
-
-int
-TAO_Log_Constraint_Visitor::visit_dot (TAO_ETCL_Dot *dot)
-{
- // If we are here, we know we're headed for a more nested
- // level, so we just visit it, there's nothing else in this
- // constraint.
- return dot->component ()->accept (this);
-}
-
-int
-TAO_Log_Constraint_Visitor::visit_eval (TAO_ETCL_Eval *eval)
-{
- // Nothing to do but visit the contained component.
- return eval->component ()->accept (this);
-}
-
-int
-TAO_Log_Constraint_Visitor::visit_default (TAO_ETCL_Default *def)
-{
- TAO_ETCL_Constraint *comp = def->component ();
-
- if (comp == 0)
- {
- return -1;
- }
-
- if (comp->accept (this) != 0)
- {
- return -1;
- }
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- CORBA::TypeCode_var tc = this->current_member_->type ();
-
- // If the current member is not a union, this call will
- // throw BadKind and the catch block will return -1.
- CORBA::Long default_index = tc->default_index (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // No default index.
- if (default_index == -1)
- {
- TAO_ETCL_Literal_Constraint result ((CORBA::Boolean) 0);
- this->queue_.enqueue_head (result);
- return 0;
- }
-
- // Okay, there's a default index, but is it active?
-
- TAO_ETCL_Literal_Constraint disc;
- this->queue_.dequeue_head (disc);
- TAO_ETCL_Literal_Constraint default_index_value (default_index);
- return (disc == default_index_value);
- }
- ACE_CATCHANY
- {
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-}
-
-int
-TAO_Log_Constraint_Visitor::visit_exist (TAO_ETCL_Exist *exist)
-{
- TAO_ETCL_Constraint *component = exist->component ();
-
- if (component->accept (this) == 0)
- {
- TAO_ETCL_Literal_Constraint top;
-
- this->queue_.dequeue_head (top);
-
- const char *value = (const char *) top;
- ACE_CString key (value, 0, 0);
-
- CORBA::Boolean result = (this->property_lookup_.find (key) == 0);
-
- this->queue_.enqueue_head (TAO_ETCL_Literal_Constraint (result));
-
- return 0;
- }
-
- return -1;
-}
-
-int
-TAO_Log_Constraint_Visitor::visit_unary_expr (
- TAO_ETCL_Unary_Expr *unary_expr
- )
-{
- TAO_ETCL_Constraint *subexpr = unary_expr->subexpr ();
-
- if (subexpr->accept (this) == 0)
- {
- TAO_ETCL_Literal_Constraint subexpr_result;
- CORBA::Boolean result = 0;
- int op_type = unary_expr->type ();
-
- switch (op_type)
- {
- case TAO_ETCL_NOT:
- this->queue_.dequeue_head (subexpr_result);
- result = ! (CORBA::Boolean) subexpr_result;
- this->queue_.enqueue_head (TAO_ETCL_Literal_Constraint (result));
- return 0;
- case TAO_ETCL_MINUS:
- // The leading '-' was parsed separately, so we have to pull
- // the literal constraint off the queue, apply the class' own
- // unary minus operator, and put it back.
- this->queue_.dequeue_head (subexpr_result);
- this->queue_.enqueue_head (-subexpr_result);
- return 0;
- case TAO_ETCL_PLUS:
- // Leave the literal constraint on the queue. The leading
- // '+' was just syntactic sugar - no action is necessary.
- return 0;
- default:
- // The parser should never construct a TAO_ETCL_Unary_Constraint
- // behind any operators except the above three.
- return -1;
- }
- }
-
- return -1;
-}
-
-int
-TAO_Log_Constraint_Visitor::visit_binary_expr (
- TAO_ETCL_Binary_Expr *binary_expr
- )
-{
-
- // Evaluate the constraint
- int bin_op_type = binary_expr->type ();
-
- switch (bin_op_type)
- {
- case TAO_ETCL_OR:
- return this->visit_or (binary_expr);
- case TAO_ETCL_AND:
- return this->visit_and (binary_expr);
- case TAO_ETCL_LT:
- case TAO_ETCL_LE:
- case TAO_ETCL_GT:
- case TAO_ETCL_GE:
- case TAO_ETCL_EQ:
- case TAO_ETCL_NE:
- case TAO_ETCL_PLUS:
- case TAO_ETCL_MINUS:
- case TAO_ETCL_MULT:
- case TAO_ETCL_DIV:
- return this->visit_binary_op (binary_expr,
- bin_op_type);
- case TAO_ETCL_TWIDDLE:
- return this->visit_twiddle (binary_expr);
- case TAO_ETCL_IN:
- return this->visit_in (binary_expr);
- default:
- return -1;
- }
-}
-
-int
-TAO_Log_Constraint_Visitor::visit_or (
- TAO_ETCL_Binary_Expr *binary
- )
-{
- int return_value = -1;
- CORBA::Boolean result = 0;
- TAO_ETCL_Constraint *lhs = binary->lhs ();
-
- if (lhs->accept (this) == 0)
- {
- TAO_ETCL_Literal_Constraint lhs_result;
- this->queue_.dequeue_head (lhs_result);
- result = (CORBA::Boolean) lhs_result;
-
- // Short-circuiting OR.
- if (result == 0)
- {
- TAO_ETCL_Constraint *rhs = binary->rhs ();
-
- if (rhs->accept (this) == 0)
- {
- TAO_ETCL_Literal_Constraint rhs_result;
- this->queue_.dequeue_head (rhs_result);
- result = (CORBA::Boolean) rhs_result;
- return_value = 0;
- }
- }
- else
- {
- return_value = 0;
- }
- }
-
- if (return_value == 0)
- {
- this->queue_.enqueue_head (TAO_ETCL_Literal_Constraint (result));
- }
-
- return return_value;
-}
-
-int
-TAO_Log_Constraint_Visitor::visit_and (
- TAO_ETCL_Binary_Expr *binary
- )
-{
- int return_value = -1;
- CORBA::Boolean result = 0;
- TAO_ETCL_Constraint *lhs = binary->lhs ();
-
- if (lhs->accept (this) == 0)
- {
- TAO_ETCL_Literal_Constraint lhs_result;
- this->queue_.dequeue_head (lhs_result);
- result = (CORBA::Boolean) lhs_result;
-
- // Short-circuiting AND.
- if (result == 1)
- {
- TAO_ETCL_Constraint *rhs = binary->rhs ();
-
- if (rhs->accept (this) == 0)
- {
- TAO_ETCL_Literal_Constraint rhs_result;
- this->queue_.dequeue_head (rhs_result);
- result = (CORBA::Boolean) rhs_result;
- return_value = 0;
- }
- }
- else
- {
- return_value = 0;
- }
- }
-
- if (return_value == 0)
- {
- this->queue_.enqueue_head (TAO_ETCL_Literal_Constraint (result));
- }
-
- return return_value;
-}
-
-int
-TAO_Log_Constraint_Visitor::visit_binary_op (
- TAO_ETCL_Binary_Expr *binary,
- int op_type
- )
-{
- int return_value = -1;
- TAO_ETCL_Constraint *lhs = binary->lhs ();
- CORBA::Boolean result = 0;
-
- // Evaluate the constraint
- // Perform an operation on the results of evaluating the left and
- // right branches of this subtree.
- if (lhs->accept (this) == 0)
- {
-
- // Evaluate the constraint
- TAO_ETCL_Literal_Constraint left_operand;
- this->queue_.dequeue_head (left_operand);
- TAO_ETCL_Constraint *rhs = binary->rhs ();
-
- if (rhs->accept (this) == 0)
- {
- TAO_ETCL_Literal_Constraint right_operand;
- this->queue_.dequeue_head (right_operand);
- return_value = 0;
-
- switch (op_type)
- {
- case TAO_ETCL_LT:
- result = left_operand < right_operand;
- this->queue_.enqueue_head (TAO_ETCL_Literal_Constraint (result));
- break;
- case TAO_ETCL_LE:
- result = left_operand <= right_operand;
- this->queue_.enqueue_head (TAO_ETCL_Literal_Constraint (result));
- break;
- case TAO_ETCL_GT:
- result = left_operand > right_operand;
- this->queue_.enqueue_head (TAO_ETCL_Literal_Constraint (result));
- break;
- case TAO_ETCL_GE:
- result = left_operand >= right_operand;
- this->queue_.enqueue_head (TAO_ETCL_Literal_Constraint (result));
- break;
- case TAO_ETCL_EQ:
- result = left_operand == right_operand;
- this->queue_.enqueue_head (TAO_ETCL_Literal_Constraint (result));
- break;
- case TAO_ETCL_NE:
- result = left_operand != right_operand;
- this->queue_.enqueue_head (TAO_ETCL_Literal_Constraint (result));
- break;
- case TAO_ETCL_PLUS:
- this->queue_.enqueue_head (left_operand + right_operand);
- break;
- case TAO_ETCL_MINUS:
- this->queue_.enqueue_head (left_operand - right_operand);
- break;
- case TAO_ETCL_MULT:
- this->queue_.enqueue_head (left_operand * right_operand);
- break;
- case TAO_ETCL_DIV:
- this->queue_.enqueue_head (left_operand / right_operand);
- break;
- default:
- return_value = -1;
- }
- }
- }
-
- return return_value;
-}
-
-int
-TAO_Log_Constraint_Visitor::visit_twiddle (
- TAO_ETCL_Binary_Expr *binary
- )
-{
- int return_value = -1;
- TAO_ETCL_Constraint *lhs = binary->lhs ();
-
- // Determine if the left operand is a substring of the right.
- if (lhs->accept (this) == 0)
- {
- TAO_ETCL_Literal_Constraint left;
- this->queue_.dequeue_head (left);
- TAO_ETCL_Constraint *rhs = binary->rhs ();
-
- if (rhs->accept (this) == 0)
- {
- TAO_ETCL_Literal_Constraint right;
- this->queue_.dequeue_head (right);
- CORBA::Boolean result =
- (ACE_OS::strstr ((const char *) left,
- (const char *) right) != 0);
- this->queue_.enqueue_head (TAO_ETCL_Literal_Constraint (result));
- return_value = 0;
- }
- }
-
- return return_value;
-}
-
-int
-TAO_Log_Constraint_Visitor::visit_in (
- TAO_ETCL_Binary_Expr *binary
- )
-{
- int return_value = -1;
- TAO_ETCL_Constraint *lhs = binary->lhs ();
-
- // Determine if the left operand is contained in the right.
-
- if (lhs->accept (this) == 0)
- {
- TAO_ETCL_Literal_Constraint left;
- this->queue_.dequeue_head (left);
-
- TAO_ETCL_Constraint *rhs = binary->rhs ();
-
- if (rhs->accept (this) == 0)
- {
- TAO_ETCL_Literal_Constraint bag;
- this->queue_.dequeue_head (bag);
-
- if (bag.expr_type () == TAO_ETCL_COMPONENT)
- {
- const CORBA::Any *component = (const CORBA::Any *) bag;
- CORBA::TCKind kind = CORBA::tk_null;
-
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- CORBA::TypeCode_var tc = component->type ();
- kind = TAO_DynAnyFactory::unalias (tc.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- return return_value;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (return_value);
-
- CORBA::Boolean result = 0;
-
- switch (kind)
- {
- case CORBA::tk_sequence:
- result = this->sequence_does_contain (component,
- left);
- break;
- case CORBA::tk_array:
- result = this->array_does_contain (component,
- left);
- break;
- case CORBA::tk_struct:
- result = this->struct_does_contain (component,
- left);
- break;
- case CORBA::tk_union:
- result = this->union_does_contain (component,
- left);
- break;
- case CORBA::tk_any:
- result = this->any_does_contain (component,
- left);
- break;
- default:
- return return_value;
- }
-
- this->queue_.enqueue_head (TAO_ETCL_Literal_Constraint (result));
- return_value = 0;
- }
- }
- }
-
- return return_value;
-}
-
-int
-TAO_Log_Constraint_Visitor::visit_preference (
- TAO_ETCL_Preference *
- )
-{
- // According to OMG 00-06-20 section 2.4.1, the Notification Service
- // does not use the preference operators. The method must be here
- // because it is called by the ETCL node, which may be used by other
- // CORBA services that do use the preference operators.
- return -1;
-}
-
-CORBA::Boolean
-TAO_Log_Constraint_Visitor::sequence_does_contain (
- const CORBA::Any *any,
- TAO_ETCL_Literal_Constraint &item
- )
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- CORBA::TypeCode_var type = any->type ();
- CORBA::TCKind kind = TAO_DynAnyFactory::unalias (type.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // The literal and the array elements must be
- // of the same simple type.
- CORBA::Boolean match = this->simple_type_match (item.expr_type (),
- kind);
-
- if (match == 0)
- {
- return 0;
- }
-
- TAO_DynSequence_i dyn_seq;
- dyn_seq.init (*any
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- DynamicAny::AnySeq_var any_seq =
- dyn_seq.get_elements (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ULong length = any_seq->length ();
-
- for (CORBA::ULong i = 0; i < length; ++i)
- {
- TAO_ETCL_Literal_Constraint element (&any_seq[i]);
-
- if (item == element)
- {
- return 1;
- }
- }
- }
- ACE_CATCHANY
- {
- return 0;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (0);
-
- return 0;
-}
-
-CORBA::Boolean
-TAO_Log_Constraint_Visitor::array_does_contain (
- const CORBA::Any *any,
- TAO_ETCL_Literal_Constraint &item
- )
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- CORBA::TypeCode_var type = any->type ();
- CORBA::TCKind kind = TAO_DynAnyFactory::unalias (type.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // The literal and the array elements must be
- // of the same simple type.
- CORBA::Boolean match = this->simple_type_match (item.expr_type (),
- kind);
-
- if (match == 0)
- {
- return 0;
- }
-
- TAO_DynArray_i dyn_array;
- dyn_array.init (*any
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- DynamicAny::AnySeq_var any_seq =
- dyn_array.get_elements (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ULong length = any_seq->length ();
-
- for (CORBA::ULong i = 0; i < length; ++i)
- {
- TAO_ETCL_Literal_Constraint element (&any_seq[i]);
-
- if (item == element)
- {
- return 1;
- }
- }
- }
- ACE_CATCHANY
- {
- return 0;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (0);
-
- return 0;
-}
-
-CORBA::Boolean
-TAO_Log_Constraint_Visitor::struct_does_contain (
- const CORBA::Any *any,
- TAO_ETCL_Literal_Constraint &item
- )
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- TAO_DynStruct_i dyn_struct;
- dyn_struct.init (*any
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- DynamicAny::NameValuePairSeq_var members =
- dyn_struct.get_members (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::ULong length = members->length ();
- CORBA::TypeCode_var tc;
- CORBA::TCKind kind;
-
- for (CORBA::ULong i = 0; i < length; ++i)
- {
- tc = members[i].value.type ();
- kind = TAO_DynAnyFactory::unalias (tc.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // The literal and the struct member must be
- // of the same simple type.
- CORBA::Boolean match = this->simple_type_match (item.expr_type (),
- kind);
-
- if (match == 0)
- {
- continue;
- }
-
- TAO_ETCL_Literal_Constraint element (&members[i].value);
-
- if (item == element)
- {
- return 1;
- }
- }
- }
- ACE_CATCHANY
- {
- return 0;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (0);
-
- return 0;
-}
-
-CORBA::Boolean
-TAO_Log_Constraint_Visitor::union_does_contain (
- const CORBA::Any *any,
- TAO_ETCL_Literal_Constraint &item
- )
-{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
- {
- TAO_DynUnion_i dyn_union;
- dyn_union.init (*any
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- DynamicAny::DynAny_var cc =
- dyn_union.current_component (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Any_var member = cc->to_any (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::TypeCode_var tc = member->type ();
- CORBA::TCKind kind = TAO_DynAnyFactory::unalias (tc.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // The literal and the union member must be
- // of the same simple type.
- CORBA::Boolean match = this->simple_type_match (item.expr_type (),
- kind);
-
- if (match == 0)
- {
- return 0;
- }
-
- TAO_ETCL_Literal_Constraint element (&member.inout ());
-
- return (item == element);
- }
- ACE_CATCHANY
- {
- return 0;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (0);
-}
-
-CORBA::Boolean
-TAO_Log_Constraint_Visitor::any_does_contain (
- const CORBA::Any *any,
- TAO_ETCL_Literal_Constraint &item
- )
-{
- const CORBA::Any *result = 0;
-
- *any >>= result;
-
- TAO_ETCL_Literal_Constraint element (const_cast<CORBA::Any *> (result));
-
- return (item == element);
-}
-
-CORBA::Boolean
-TAO_Log_Constraint_Visitor::simple_type_match (int expr_type,
- CORBA::TCKind tc_kind)
-{
- switch (expr_type)
- {
- case TAO_ETCL_STRING:
- if (tc_kind != CORBA::tk_string)
- {
- return 0;
- }
- case TAO_ETCL_DOUBLE:
- if (tc_kind != CORBA::tk_double
- && tc_kind != CORBA::tk_float)
- {
- return 0;
- }
- case TAO_ETCL_INTEGER:
- case TAO_ETCL_SIGNED:
- if (tc_kind != CORBA::tk_short
- && tc_kind != CORBA::tk_long
- && tc_kind != CORBA::tk_longlong)
- {
- return 0;
- }
- case TAO_ETCL_UNSIGNED:
- if (tc_kind != CORBA::tk_ushort
- && tc_kind != CORBA::tk_ulong
- && tc_kind != CORBA::tk_ulonglong)
- {
- return 0;
- }
- case TAO_ETCL_BOOLEAN:
- if (tc_kind != CORBA::tk_boolean)
- {
- return 0;
- }
- default:
- return 0;
- }
-}
-
-const size_t TAO_Log_Constraint_Visitor::property_lookup_size_ = 31;
-
-TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Visitors.h b/TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Visitors.h
deleted file mode 100644
index f9067132c3b..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Visitors.h
+++ /dev/null
@@ -1,130 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Log_Constraint_Visitors.h
- *
- * $Id$
- *
- * @author Pradeep Gore <pradeep@cs.wustl.edu>
- * @author Jeff Parsons <parsons@cs.wustl.edu>
- * @author D A Hanvey <d.hanvey@qub.ac.uk>
- */
-//=============================================================================
-
-
-#ifndef TAO_LOG_CONSTRAINT_VISITORS_H
-#define TAO_LOG_CONSTRAINT_VISITORS_H
-
-#include /**/ "ace/pre.h"
-
-#include "ace/Hash_Map_Manager.h"
-#include "ace/Unbounded_Queue.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "orbsvcs/ETCL/ETCL_Constraint_Visitor.h"
-#include "orbsvcs/DsLogAdminC.h"
-#include "ace/Null_Mutex.h"
-
-#include "orbsvcs/Log/log_serv_export.h"
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-class TAO_ETCL_Constraint;
-class TAO_ETCL_Literal_Constraint;
-class TAO_Log_Property_Constraint;
-
-/**
- * @class TAO_Log_Constraint_Visitor
- *
- * @brief "ETCL" Visitor for the Log queries.
- */
-class TAO_Log_Serv_Export TAO_Log_Constraint_Visitor :
- public TAO_ETCL_Constraint_Visitor
-{
-public:
-
- /// Constructor.
- TAO_Log_Constraint_Visitor (const DsLogAdmin::LogRecord &rec);
-
- /**
- * Returns 1 if the offer satisfies the constraint
- * represented by the the expression tree rooted at <root>, 0 if it
- * doesn't. If an error occurs during process, the traversal
- * automatically fails.
- */
- CORBA::Boolean evaluate_constraint (TAO_ETCL_Constraint *root);
-
- // = The overridden methods.
- int visit_literal (TAO_ETCL_Literal_Constraint *);
- int visit_identifier (TAO_ETCL_Identifier *);
- int visit_union_value (TAO_ETCL_Union_Value *);
- int visit_union_pos (TAO_ETCL_Union_Pos *);
- int visit_component_pos (TAO_ETCL_Component_Pos *);
- int visit_component_assoc (TAO_ETCL_Component_Assoc *);
- int visit_component_array (TAO_ETCL_Component_Array *);
- int visit_special (TAO_ETCL_Special *);
- int visit_component (TAO_ETCL_Component *);
- int visit_dot (TAO_ETCL_Dot *);
- int visit_eval (TAO_ETCL_Eval *);
- int visit_default (TAO_ETCL_Default *);
- int visit_exist (TAO_ETCL_Exist *);
- int visit_unary_expr (TAO_ETCL_Unary_Expr *);
- int visit_binary_expr (TAO_ETCL_Binary_Expr *);
- int visit_preference (TAO_ETCL_Preference *);
-
-private:
- // = Sub-methods for visit_binary_expr().
- int visit_or (TAO_ETCL_Binary_Expr *);
- int visit_and (TAO_ETCL_Binary_Expr *);
- int visit_twiddle (TAO_ETCL_Binary_Expr *);
- int visit_in (TAO_ETCL_Binary_Expr *);
- int visit_binary_op (TAO_ETCL_Binary_Expr *binary_expr,
- int op_type);
-
- // = These use dynamic anys look inside the ETCL component.
- CORBA::Boolean sequence_does_contain (const CORBA::Any *any,
- TAO_ETCL_Literal_Constraint &item);
- CORBA::Boolean array_does_contain (const CORBA::Any *any,
- TAO_ETCL_Literal_Constraint &item);
- CORBA::Boolean struct_does_contain (const CORBA::Any *any,
- TAO_ETCL_Literal_Constraint &item);
- CORBA::Boolean union_does_contain (const CORBA::Any *any,
- TAO_ETCL_Literal_Constraint &item);
- CORBA::Boolean any_does_contain (const CORBA::Any *any,
- TAO_ETCL_Literal_Constraint &item);
-
- /// Utility function to compare a TAO_ETCL_Literal_Constraint type
- /// and a type code.
- CORBA::Boolean simple_type_match (int expr_type,
- CORBA::TCKind tc_kind);
-
-private:
- /// Size of property_lookup_ hash map.
- /// TODO: define inline once VC6 support is deprecated.
- static const size_t property_lookup_size_;
-
- typedef ACE_Hash_Map_Manager <ACE_CString,
- CORBA::Any,
- ACE_Null_Mutex> HASH_MAP;
-
- typedef HASH_MAP::ENTRY HASH_ENTRY;
-
- /// Used to lookup property name and values.
- HASH_MAP property_lookup_;
-
- /// The result of a non_boolean operation.
- ACE_Unbounded_Queue<TAO_ETCL_Literal_Constraint> queue_;
-
- /// Holder for a value found in property_lookup_ or for a
- /// nested type within that value.
- CORBA::Any_var current_member_;
-};
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#include /**/ "ace/post.h"
-#endif /* TAO_LOG_CONSTRAINT_VISITORS_H */
diff --git a/TAO/orbsvcs/orbsvcs/Log/Log_Flush_Handler.cpp b/TAO/orbsvcs/orbsvcs/Log/Log_Flush_Handler.cpp
deleted file mode 100644
index 122d35c486c..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/Log_Flush_Handler.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-#include "orbsvcs/Log/Log_Flush_Handler.h"
-#include "orbsvcs/Log/Log_i.h"
-
-ACE_RCSID (Log,
- Log_Flush_Handler,
- "$Id$")
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-TAO_Log_Flush_Handler::TAO_Log_Flush_Handler (ACE_Reactor* reactor,
- TAO_Log_i* log,
- const ACE_Time_Value& interval)
- : timer_id_(-1),
- reactor_(reactor),
- log_(log),
- interval_(interval)
-{
-}
-
-TAO_Log_Flush_Handler::~TAO_Log_Flush_Handler ()
-{
- this->cancel ();
-}
-
-void
-TAO_Log_Flush_Handler::schedule ()
-{
- this->cancel ();
- this->timer_id_ =
- this->reactor_->schedule_timer (this, 0, this->interval_, this->interval_);
-}
-
-void
-TAO_Log_Flush_Handler::cancel ()
-{
- if (this->timer_id_ != -1)
- {
- this->reactor_->cancel_timer (timer_id_);
- this->timer_id_ = -1;
- }
-}
-
-int
-TAO_Log_Flush_Handler::handle_timeout (const ACE_Time_Value&, const void *)
-{
- ACE_TRY_NEW_ENV
- {
- log_->flush (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/orbsvcs/orbsvcs/Log/Log_Flush_Handler.h b/TAO/orbsvcs/orbsvcs/Log/Log_Flush_Handler.h
deleted file mode 100644
index f61d40ad999..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/Log_Flush_Handler.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Log_Flush_Handler.h
- *
- * $Id$
- *
- */
-//=============================================================================
-
-#ifndef TAO_TLS_FLUSH_HANDLER_H
-#define TAO_TLS_FLUSH_HANDLER_H
-
-#include "orbsvcs/Log/log_serv_export.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/Versioned_Namespace.h"
-
-#include "ace/Event_Handler.h"
-#include "ace/Time_Value.h"
-
-ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-class ACE_Reactor;
-ACE_END_VERSIONED_NAMESPACE_DECL
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-class TAO_Log_i;
-
-/// @class TAO_Log_Flush_Handler
-/// @brief Periodically flush log records to persistent store
-///
-class TAO_Log_Serv_Export TAO_Log_Flush_Handler
- : public ACE_Event_Handler
-{
-public:
- /// Constructor.
- TAO_Log_Flush_Handler (ACE_Reactor* reactor,
- TAO_Log_i* log,
- const ACE_Time_Value& interval);
-
- /// Destructor.
- ~TAO_Log_Flush_Handler ();
-
- /// Schedule Timer.
- void schedule ();
-
- /// Cancel Timer.
- void cancel ();
-
- virtual int handle_timeout (const ACE_Time_Value &tv, const void *arg);
-
-private:
- long timer_id_;
- ACE_Reactor* reactor_;
- TAO_Log_i* log_;
- ACE_Time_Value interval_;
-};
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#endif /* TAO_LOG_FLUSH_HANDLER_H */
diff --git a/TAO/orbsvcs/orbsvcs/Log/Log_Persistence_Strategy.h b/TAO/orbsvcs/orbsvcs/Log/Log_Persistence_Strategy.h
deleted file mode 100644
index 5e8832c5dee..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/Log_Persistence_Strategy.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Log_Persistence_Strategy.h
- *
- * $Id$
- *
- * @author Matthew Braun <mjb2@cs.wustl.edu>
- * @author Pradeep Gore <pradeep@cs.wustl.edu>
- * @author David A. Hanvey <d.hanvey@qub.ac.uk>
- */
-//=============================================================================
-
-#ifndef TAO_TLS_PERSISTENCE_STRATEGY_H
-#define TAO_TLS_PERSISTENCE_STRATEGY_H
-
-#include /**/ "ace/pre.h"
-
-#include "orbsvcs/Log/log_serv_export.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/Versioned_Namespace.h"
-#include "ace/Service_Object.h"
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-class TAO_LogStore;
-class TAO_LogMgr_i;
-
-namespace CORBA
-{
- class ORB;
- typedef ORB* ORB_ptr;
-}
-
-/**
- * @class TAO_Log_Persistence_Strategy
- *
- * @brief Base Strategy for Log / Log Record Storage
- *
- */
-class TAO_Log_Serv_Export TAO_Log_Persistence_Strategy
- : public ACE_Service_Object
-{
-public:
- /// @brief Log Store Factory
- virtual TAO_LogStore*
- create_log_store (TAO_LogMgr_i* logmgr_i) = 0;
-
-private:
-};
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#include /**/ "ace/post.h"
-
-#endif /* TAO_TLS_PERSISTENCE_STRATEGY_H */
diff --git a/TAO/orbsvcs/orbsvcs/Log/Log_i.cpp b/TAO/orbsvcs/orbsvcs/Log/Log_i.cpp
deleted file mode 100644
index 263ef5d7ebc..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/Log_i.cpp
+++ /dev/null
@@ -1,1859 +0,0 @@
-#include "orbsvcs/Log/Log_i.h"
-#include "orbsvcs/Log/LogMgr_i.h"
-#include "orbsvcs/Time_Utilities.h"
-
-#include "tao/debug.h"
-#include "tao/ORB_Core.h"
-#include "ace/OS_NS_stdio.h"
-#include "ace/OS_NS_sys_time.h"
-
-ACE_RCSID (Log,
- Log_i,
- "$Id$")
-
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-// Log Compaction Interval
-const ACE_Time_Value
-TAO_Log_i::log_compaction_interval_ = ACE_Time_Value(60);
-
-// Log Flush Interval
-const ACE_Time_Value
-TAO_Log_i::log_flush_interval_ = ACE_Time_Value(5 * 60);
-
-
-TAO_Log_i::TAO_Log_i (CORBA::ORB_ptr orb,
- TAO_LogMgr_i &logmgr_i,
- DsLogAdmin::LogMgr_ptr factory,
- DsLogAdmin::LogId logid,
- TAO_LogNotification *log_notifier)
- : logmgr_i_(logmgr_i),
- factory_ (DsLogAdmin::LogMgr::_duplicate (factory)),
- logid_ (logid),
- op_state_ (DsLogAdmin::disabled),
- reactor_ (orb->orb_core()->reactor()),
- notifier_ (log_notifier),
- log_compaction_handler_ (reactor_, this, log_compaction_interval_),
- log_flush_handler_ (reactor_, this, log_flush_interval_)
-{
- // TODO: get log parameters from (persistent?) store.
- avail_status_.off_duty = 0;
- avail_status_.log_full = 0;
-}
-
-void
-TAO_Log_i::init (ACE_ENV_SINGLE_ARG_DECL)
-{
-#if 0
- // @@ Calling create_log_reference () here leads to an infinate loop.
- // When this is fixed, this can be enabled.
- this->log_ =
- logmgr_i_.create_log_reference (this->logid_ ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-#endif
-
- this->recordstore_ =
- logmgr_i_.get_log_record_store (this->logid_ ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (this->recordstore_->open () ==-1)
- ACE_THROW (CORBA::UNKNOWN ());
-
- // fetch the capacity alarm thresholds from the log record store
- DsLogAdmin::CapacityAlarmThresholdList_var thresholds =
- this->recordstore_->get_capacity_alarm_thresholds (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // initialize the internal representation
- this->thresholds_ = thresholds.in ();
- this->reset_capacity_alarm_threshold (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
-
- // fetch the log QoS from the log record store
- DsLogAdmin::QoSList_var qos =
- this->recordstore_->get_log_qos (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // initialize the internal representation.
- this->reset_log_qos (qos.in ());
-
-
- // fetch the week mask from the log record store
- DsLogAdmin::WeekMask_var week_mask =
- this->recordstore_->get_week_mask (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // initialize the internal representation
- this->reset_week_mask (week_mask.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
-
- // fetch the maximum record life from the log record store
- CORBA::ULong max_record_life =
- this->recordstore_->get_max_record_life (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // if set, activate the compaction handler
- if (max_record_life != 0)
- {
- this->log_compaction_handler_.schedule ();
- }
-
- this->op_state_ = DsLogAdmin::enabled;
-}
-
-TAO_Log_i::~TAO_Log_i (void)
-{
-}
-
-DsLogAdmin::LogMgr_ptr
-TAO_Log_i::my_factory (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return DsLogAdmin::LogMgr::_duplicate (this->factory_.in ());
-}
-
-DsLogAdmin::LogId
-TAO_Log_i::id (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return logid_;
-}
-
-DsLogAdmin::QoSList*
-TAO_Log_i::get_log_qos (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_READ_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- this->recordstore_->lock (),
- CORBA::INTERNAL ());
- ACE_CHECK_RETURN (0);
-
- // @@ The current revision of the specification (formal/03-07-01)
- // states that get_log_qos() returns a list of the QoS properties
- // supported by the log, not the current value. However, because
- // that is inconsistent with both the Log Service's other get
- // methods and the Notification Service's QoS get_qos methods, I
- // have submitted a defect report to the OMG for clarification.
- // --jtc
-
- return this->recordstore_->get_log_qos (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-void
-TAO_Log_i::set_log_qos (const DsLogAdmin::QoSList &qos
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::UnsupportedQoS))
-{
- ACE_WRITE_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- this->recordstore_->lock (),
- CORBA::INTERNAL ());
- ACE_CHECK;
-
- // @@ The current revision of the specification (formal/03-07-01)
- // does not clearly define the semantics to follow when the QoSList
- // contains mutually exclusive, unsupported, or unknown properties.
- // I have submitted a defect report to the OMG for clarification.
- //
- // In the mean time, the last known/supported property found in the
- // QoSList takes presidence. If any unknown/unsupported properties
- // were found, an UnsupportedQoS exception is thrown.
- // --jtc
-
- validate_log_qos (qos);
-
- DsLogAdmin::QoSList_var old_qos =
- this->recordstore_->get_log_qos (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // @@ The current revision of the specification (formal/03-07-01) is
- // unclear whether an AttributeValueChange event should be sent if a
- // log attribute was changed (to a new value), or whether the events
- // should be sent unconditionally. I have submitted a defect report
- // to the OMG for clarification.
- //
- // In the mean time, we're interepreting it to mean that events are
- // only sent when the value has changed.
- if (qos == old_qos.in ())
- return;
-
- this->recordstore_->set_log_qos (qos ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- reset_log_qos (qos);
-
- if (notifier_)
- {
- // @@ Calling create_log_reference () in the ctor or in ::init()
- // leads to an infinate loop. This should be removed when that
- // is fixed.
- if (CORBA::is_nil (this->log_.in ()))
- {
- this->log_ = logmgr_i_.create_log_reference (this->logid_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- notifier_->quality_of_service_value_change (this->log_.in (),
- this->logid_,
- old_qos.in (),
- qos
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-}
-
-CORBA::ULong
-TAO_Log_i::get_max_record_life (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_READ_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- this->recordstore_->lock (),
- CORBA::INTERNAL ());
- ACE_CHECK_RETURN (0);
-
- return
- this->recordstore_->get_max_record_life(ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-void
-TAO_Log_i::set_max_record_life (CORBA::ULong life
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_WRITE_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- this->recordstore_->lock (),
- CORBA::INTERNAL ());
- ACE_CHECK;
-
- CORBA::ULong old_life =
- this->recordstore_->get_max_record_life (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // @@ The current revision of the specification (formal/03-07-01) is
- // unclear whether an AttributeValueChange event should be sent if a
- // log attribute was changed (to a new value), or whether the events
- // should be sent unconditionally. I have submitted a defect report
- // to the OMG for clarification.
- //
- // In the mean time, we're interepreting it to mean that events are
- // only sent when the value has changed.
- if (life == old_life)
- return;
-
- this->recordstore_->set_max_record_life (life ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (life != 0)
- this->log_compaction_handler_.schedule();
- else
- this->log_compaction_handler_.cancel();
-
- if (notifier_)
- {
- // @@ Calling create_log_reference () in the ctor or in ::init()
- // leads to an infinate loop. This should be removed when that
- // is fixed.
- if (CORBA::is_nil (this->log_.in ()))
- {
- this->log_ = logmgr_i_.create_log_reference (this->logid_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- notifier_->max_record_life_value_change (this->log_.in (),
- this->logid_,
- old_life,
- life
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-}
-
-CORBA::ULongLong
-TAO_Log_i::get_max_size (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_READ_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- this->recordstore_->lock (),
- CORBA::INTERNAL ());
- ACE_CHECK_RETURN (0);
-
- return recordstore_->get_max_size (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-void
-TAO_Log_i::set_max_size (CORBA::ULongLong size
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidParam))
-{
- ACE_WRITE_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- this->recordstore_->lock (),
- CORBA::INTERNAL ());
- ACE_CHECK;
-
- CORBA::ULongLong old_size =
- this->recordstore_->get_max_size (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // @@ The current revision of the specification (formal/03-07-01) is
- // unclear whether an AttributeValueChange event should be sent if a
- // log attribute was changed (to a new value), or whether the events
- // should be sent unconditionally. I have submitted a defect report
- // to the OMG for clarification.
- //
- // In the mean time, we're interepreting it to mean that events are
- // only sent when the value has changed.
- if (size == old_size)
- return;
-
- // size == 0 => infinite size.
- if (size != 0)
- {
- CORBA::ULongLong current_size =
- this->recordstore_->get_current_size (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (size < current_size)
- ACE_THROW (DsLogAdmin::InvalidParam ());
- }
-
- this->recordstore_->set_max_size (size ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (notifier_)
- {
- // @@ Calling create_log_reference () in the ctor or in ::init()
- // leads to an infinate loop. This should be removed when that
- // is fixed.
- if (CORBA::is_nil (this->log_.in ()))
- {
- this->log_ = logmgr_i_.create_log_reference (this->logid_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- notifier_->max_log_size_value_change (this->log_.in (),
- this->logid_,
- old_size,
- size
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- // @@ The current revision of the specification (formal/03-07-01)
- // doesn't specify the interaction between set_max_size() and the
- // capacity alarm thresholds list. Publicly available documentation
- // I've read for other log service implementations doesn't offer any
- // guidance either. I have submitted a defect report to the OMG for
- // clarification.
- //
- // In the mean time, we will call reset_capacity_alarm_threshold()
- // to reset the "current_threshold_" index. This will result in
- // ThresholdAlarm being sent when the next threshold is crossed. An
- // argument could be made that an event should be be sent for each
- // threshold that has already been crossed. Hopefully, this will be
- // clarified when/if the OMG charters a RTF for the log service.
- // --jtc
- //
- this->reset_capacity_alarm_threshold (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-CORBA::ULongLong
-TAO_Log_i::get_current_size (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_READ_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- this->recordstore_->lock (),
- CORBA::INTERNAL ());
- ACE_CHECK_RETURN (0);
-
- return this->recordstore_->get_current_size (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-CORBA::ULongLong
-TAO_Log_i::get_n_records (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_READ_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- this->recordstore_->lock (),
- CORBA::INTERNAL ());
- ACE_CHECK_RETURN (0);
-
- return this->recordstore_->get_n_records (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-DsLogAdmin::LogFullActionType
-TAO_Log_i::get_log_full_action (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_READ_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- this->recordstore_->lock (),
- CORBA::INTERNAL ());
- ACE_CHECK_RETURN (0);
-
- return this->recordstore_->get_log_full_action(ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-void
-TAO_Log_i::set_log_full_action (DsLogAdmin::LogFullActionType action
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidLogFullAction))
-{
- ACE_WRITE_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- this->recordstore_->lock (),
- CORBA::INTERNAL ());
- ACE_CHECK;
-
- if (action != DsLogAdmin::wrap && action != DsLogAdmin::halt)
- ACE_THROW (DsLogAdmin::InvalidLogFullAction ());
-
- DsLogAdmin::LogFullActionType old_action =
- this->recordstore_->get_log_full_action (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // @@ The current revision of the specification (formal/03-07-01) is
- // unclear whether an AttributeValueChange event should be sent if a
- // log attribute was changed (to a new value), or whether the events
- // should be sent unconditionally. I have submitted a defect report
- // to the OMG for clarification.
- //
- // In the mean time, we're interepreting it to mean that events are
- // only sent when the value has changed.
- if (action == old_action)
- return;
-
- this->recordstore_->set_log_full_action (action ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (notifier_)
- {
- // @@ Calling create_log_reference () in the ctor or in ::init()
- // leads to an infinate loop. This should be removed when that
- // is fixed.
- if (CORBA::is_nil (this->log_.in ()))
- {
- this->log_ = logmgr_i_.create_log_reference (this->logid_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- notifier_->log_full_action_value_change (this->log_.in (),
- this->logid_,
- old_action,
- action
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- // @@ The current revision of the specification (formal/03-07-01)
- // doesn't specify the interaction between set_log_full_action() and the
- // capacity alarm thresholds list. Publicly available documentation
- // I've read for other log service implementations doesn't offer any
- // guidance either. I have submitted a defect report to the OMG for
- // clarification.
- //
- // In the mean time, we will call reset_capacity_alarm_threshold()
- // to reset the "current_threshold_" index. This will result in
- // ThresholdAlarm being sent when the next threshold is crossed. An
- // argument could be made that an event should be be sent for each
- // threshold that has already been crossed. Hopefully, this will be
- // clarified when/if the OMG charters a RTF for the log service.
- // --jtc
- //
- this->reset_capacity_alarm_threshold (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-DsLogAdmin::AdministrativeState
-TAO_Log_i::get_administrative_state (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_READ_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- this->recordstore_->lock (),
- CORBA::INTERNAL ());
- ACE_CHECK_RETURN (0);
-
- return this->recordstore_->get_administrative_state (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-void
-TAO_Log_i::set_administrative_state (DsLogAdmin::AdministrativeState state
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_WRITE_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- this->recordstore_->lock (),
- CORBA::INTERNAL ());
- ACE_CHECK;
-
- DsLogAdmin::AdministrativeState old_state =
- this->recordstore_->get_administrative_state (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // @@ The current revision of the specification (formal/03-07-01) is
- // unclear whether an AttributeValueChange event should be sent if a
- // log attribute was changed (to a new value), or whether the events
- // should be sent unconditionally. I have submitted a defect report
- // to the OMG for clarification.
- //
- // In the mean time, we're interepreting it to mean that events are
- // only sent when the value has changed.
- if (state == old_state)
- return;
-
- this->recordstore_->set_administrative_state (state ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (notifier_)
- {
- // @@ Calling create_log_reference () in the ctor or in ::init()
- // leads to an infinate loop. This should be removed when that
- // is fixed.
- if (CORBA::is_nil (this->log_.in ()))
- {
- this->log_ = logmgr_i_.create_log_reference (this->logid_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- notifier_->administrative_state_change (this->log_.in (),
- this->logid_,
- state
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-}
-
-DsLogAdmin::ForwardingState
-TAO_Log_i::get_forwarding_state (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_READ_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- this->recordstore_->lock (),
- CORBA::INTERNAL ());
- ACE_CHECK_RETURN (0);
-
- return
- this->recordstore_->get_forwarding_state (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-void
-TAO_Log_i::set_forwarding_state (DsLogAdmin::ForwardingState state
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_WRITE_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- this->recordstore_->lock (),
- CORBA::INTERNAL ());
- ACE_CHECK;
-
- DsLogAdmin::ForwardingState old_state =
- this->recordstore_->get_forwarding_state (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // @@ The current revision of the specification (formal/03-07-01) is
- // unclear whether an AttributeValueChange event should be sent if a
- // log attribute was changed (to a new value), or whether the events
- // should be sent unconditionally. I have submitted a defect report
- // to the OMG for clarification.
- //
- // In the mean time, we're interepreting it to mean that events are
- // only sent when the value has changed.
- if (state == old_state)
- return;
-
- this->recordstore_->set_forwarding_state (state ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (notifier_)
- {
- // @@ Calling create_log_reference () in the ctor or in ::init()
- // leads to an infinate loop. This should be removed when that
- // is fixed.
- if (CORBA::is_nil (this->log_.in ()))
- {
- this->log_ = logmgr_i_.create_log_reference (this->logid_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- notifier_->forwarding_state_change (this->log_.in (),
- this->logid_,
- state
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-}
-
-DsLogAdmin::OperationalState
-TAO_Log_i::get_operational_state (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // No locks are necessary, since op_state_ is set in ::init() and
- // never changed.
- return this->op_state_;
-}
-
-DsLogAdmin::TimeInterval
-TAO_Log_i::get_interval (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_READ_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- this->recordstore_->lock (),
- CORBA::INTERNAL ());
- ACE_CHECK_RETURN (0);
-
- return this->recordstore_->get_interval (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-void
-TAO_Log_i::set_interval (const DsLogAdmin::TimeInterval &interval
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidTime,
- DsLogAdmin::InvalidTimeInterval))
-{
- ACE_WRITE_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- this->recordstore_->lock (),
- CORBA::INTERNAL ());
- ACE_CHECK;
-
- // validate interval
- if (interval.start != 0)
- {
- if (interval.start >= interval.stop)
- ACE_THROW (DsLogAdmin::InvalidTimeInterval ());
- }
-
- DsLogAdmin::TimeInterval old_interval =
- this->recordstore_->get_interval (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // @@ The current revision of the specification (formal/03-07-01) is
- // unclear whether an AttributeValueChange event should be sent if a
- // log attribute was changed (to a new value), or whether the events
- // should be sent unconditionally. I have submitted a defect report
- // to the OMG for clarification.
- //
- // In the mean time, we're interepreting it to mean that events are
- // only sent when the value has changed.
- if (interval == old_interval)
- return;
-
- this->recordstore_->set_interval (interval ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (notifier_)
- {
- // @@ Calling create_log_reference () in the ctor or in ::init()
- // leads to an infinate loop. This should be removed when that
- // is fixed.
- if (CORBA::is_nil (this->log_.in ()))
- {
- this->log_ = logmgr_i_.create_log_reference (this->logid_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- if (interval.start != old_interval.start)
- {
- notifier_->start_time_value_change (this->log_.in (),
- this->logid_,
- old_interval.start,
- interval.start
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- if (interval.stop != old_interval.stop)
- {
- notifier_->stop_time_value_change (this->log_.in (),
- this->logid_,
- old_interval.stop,
- interval.stop
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
- }
-}
-
-DsLogAdmin::AvailabilityStatus
-TAO_Log_i::get_availability_status (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_READ_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- this->recordstore_->lock (),
- CORBA::INTERNAL ());
- ACE_CHECK_RETURN (0);
-
- return this->get_availability_status_i (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-DsLogAdmin::AvailabilityStatus
-TAO_Log_i::get_availability_status_i (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // The log is considered "on duty" if all the following are true:
- // * operational state is enabled
- // * adminstrative state is unlocked
- // * current time falls within the log duration time.
- // * current time falls within one (or more) of the log
- // scheduling times.
-
- const CORBA::Boolean s = this->scheduled (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (this->avail_status_);
-
- DsLogAdmin::AdministrativeState admin_state =
- this->recordstore_->get_administrative_state (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (this->avail_status_);
-
- if (this->op_state_ == DsLogAdmin::enabled
- && admin_state == DsLogAdmin::unlocked
- && s == 1)
- {
- this->avail_status_.off_duty = 0; // "on duty"
-
- }
- else
- this->avail_status_.off_duty = 1;
- // The log_full flag is set by the write operations.
- return this->avail_status_;
-}
-
-DsLogAdmin::CapacityAlarmThresholdList*
-TAO_Log_i::get_capacity_alarm_thresholds (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_READ_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- this->recordstore_->lock (),
- CORBA::INTERNAL ());
- ACE_CHECK_RETURN (0);
-
- return this->recordstore_->get_capacity_alarm_thresholds (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-void
-TAO_Log_i::set_capacity_alarm_thresholds (const
- DsLogAdmin::CapacityAlarmThresholdList
- &threshs
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidThreshold))
-{
- ACE_WRITE_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- this->recordstore_->lock (),
- CORBA::INTERNAL ());
- ACE_CHECK;
-
- const CORBA::Boolean validated =
- TAO_Log_i::validate_capacity_alarm_thresholds (threshs
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (!validated)
- ACE_THROW (DsLogAdmin::InvalidThreshold ());
-
- DsLogAdmin::CapacityAlarmThresholdList_var old_threshs =
- this->recordstore_->get_capacity_alarm_thresholds (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // @@ The current revision of the specification (formal/03-07-01) is
- // unclear whether an AttributeValueChange event should be sent if a
- // log attribute was changed (to a new value), or whether the events
- // should be sent unconditionally. I have submitted a defect report
- // to the OMG for clarification.
- //
- // In the mean time, we're interepreting it to mean that events are
- // only sent when the value has changed.
- if (threshs == old_threshs.in ())
- return;
-
- this->recordstore_->set_capacity_alarm_thresholds (threshs
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (notifier_)
- {
- // @@ Calling create_log_reference () in the ctor or in ::init()
- // leads to an infinate loop. This should be removed when that
- // is fixed.
- if (CORBA::is_nil (this->log_.in ()))
- {
- this->log_ = logmgr_i_.create_log_reference (this->logid_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- notifier_->capacity_alarm_threshold_value_change (this->log_.in (),
- this->logid_,
- old_threshs.in (),
- threshs
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- // @@ The current revision of the specification (formal/03-07-01)
- // doesn't completly describe the behavior of changing the capacity
- // alarm threshold list. Publicly available documentation I've read
- // for other log service implementations doesn't offer much guidance
- // either. I have submitted a defect report to the OMG for
- // clarification.
- //
- // In the mean time, we will call reset_capacity_alarm_threshold()
- // to reset the "current_threshold_" index. This will result in
- // ThresholdAlarm being sent when the next threshold is crossed. An
- // argument could be made that an event should be be sent for each
- // threshold that has already been crossed. Hopefully, this will be
- // clarified when/if the OMG charters a RTF for the log service.
- // --jtc
- //
- this->thresholds_ = threshs;
- this->reset_capacity_alarm_threshold (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-DsLogAdmin::WeekMask*
-TAO_Log_i::get_week_mask (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_READ_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- this->recordstore_->lock (),
- CORBA::INTERNAL ());
- ACE_CHECK_RETURN (0);
-
- return this->recordstore_->get_week_mask (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-void
-TAO_Log_i::set_week_mask (const DsLogAdmin::WeekMask &masks
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidTime,
- DsLogAdmin::InvalidTimeInterval,
- DsLogAdmin::InvalidMask))
-{
- ACE_WRITE_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- this->recordstore_->lock (),
- CORBA::INTERNAL ());
- ACE_CHECK;
-
- validate_week_mask (masks ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- DsLogAdmin::WeekMask_var old_masks =
- this->recordstore_->get_week_mask (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // @@ The current revision of the specification (formal/03-07-01) is
- // unclear whether an AttributeValueChange event should be sent if a
- // log attribute was changed (to a new value), or whether the events
- // should be sent unconditionally. I have submitted a defect report
- // to the OMG for clarification.
- //
- // In the mean time, we're interepreting it to mean that events are
- // only sent when the value has changed.
- if (masks == old_masks.in ())
- return;
-
- this->recordstore_->set_week_mask (masks ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->reset_week_mask (masks ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (notifier_)
- {
- // @@ Calling create_log_reference () in the ctor or in ::init()
- // leads to an infinate loop. This should be removed when that
- // is fixed.
- if (CORBA::is_nil (this->log_.in ()))
- {
- this->log_ = logmgr_i_.create_log_reference (this->logid_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- notifier_->week_mask_value_change (this->log_.in (),
- this->logid_,
- old_masks.in (),
- masks
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-}
-
-DsLogAdmin::RecordList*
-TAO_Log_i::query (const char *grammar,
- const char *constraint,
- DsLogAdmin::Iterator_out iter_out
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidGrammar,
- DsLogAdmin::InvalidConstraint))
-{
- ACE_READ_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- this->recordstore_->lock (),
- CORBA::INTERNAL ());
- ACE_CHECK_RETURN (0);
-
- return this->recordstore_->query (grammar,
- constraint,
- iter_out
- ACE_ENV_ARG_PARAMETER);
-}
-
-DsLogAdmin::RecordList*
-TAO_Log_i::retrieve (DsLogAdmin::TimeT from_time,
- CORBA::Long how_many,
- DsLogAdmin::Iterator_out iter_out
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_READ_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- this->recordstore_->lock (),
- CORBA::INTERNAL ());
- ACE_CHECK_RETURN (0);
-
- return this->recordstore_->retrieve (from_time,
- how_many,
- iter_out
- ACE_ENV_ARG_PARAMETER);
-}
-
-CORBA::ULong
-TAO_Log_i::match (const char* grammar,
- const char *constraint
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidGrammar,
- DsLogAdmin::InvalidConstraint))
-{
- ACE_READ_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- this->recordstore_->lock (),
- CORBA::INTERNAL ());
- ACE_CHECK_RETURN (0);
-
- const CORBA::ULong count =
- this->recordstore_->match (grammar,
- constraint
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- return count;
-}
-
-CORBA::ULong
-TAO_Log_i::delete_records (const char *grammar,
- const char *constraint
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidGrammar,
- DsLogAdmin::InvalidConstraint))
-{
- ACE_WRITE_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- this->recordstore_->lock (),
- CORBA::INTERNAL ());
- ACE_CHECK_RETURN (0);
-
- const CORBA::ULong count =
- this->recordstore_->delete_records (grammar,
- constraint
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- if (count > 0)
- {
- if (avail_status_.log_full)
- {
- const CORBA::ULongLong current_size =
- this->recordstore_->get_current_size (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- const CORBA::ULongLong max_size =
- this->recordstore_->get_max_size (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- if (current_size < max_size)
- {
- avail_status_.log_full = 0;
- }
- }
-
- this->reset_capacity_alarm_threshold (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
- }
-
- return count;
-}
-
-CORBA::ULong
-TAO_Log_i::delete_records_by_id (const DsLogAdmin::RecordIdList &ids
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_WRITE_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- this->recordstore_->lock (),
- CORBA::INTERNAL ());
- ACE_CHECK_RETURN (0);
-
- const CORBA::ULong count =
- this->recordstore_->delete_records_by_id (ids ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- if (count > 0)
- {
- if (avail_status_.log_full)
- {
- const CORBA::ULongLong current_size =
- this->recordstore_->get_current_size (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- const CORBA::ULongLong max_size =
- this->recordstore_->get_max_size (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- if (current_size < max_size)
- {
- avail_status_.log_full = 0;
- }
- }
-
- this->reset_capacity_alarm_threshold (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
- }
-
- return count;
-}
-
-void
-TAO_Log_i::write_records (const DsLogAdmin::Anys &records
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::LogFull,
- DsLogAdmin::LogOffDuty,
- DsLogAdmin::LogLocked,
- DsLogAdmin::LogDisabled))
-{
- // create a record list..
- DsLogAdmin::RecordList reclist (records.length ());
- reclist.length (records.length ());
-
- for (CORBA::ULong i = 0; i < records.length (); ++i)
- {
- reclist [i].info = records[i];
- }
-
- this->write_recordlist (reclist ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-TAO_Log_i::write_recordlist (const DsLogAdmin::RecordList &reclist
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::LogFull,
- DsLogAdmin::LogOffDuty,
- DsLogAdmin::LogLocked,
- DsLogAdmin::LogDisabled))
-{
- ACE_WRITE_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- this->recordstore_->lock (),
- CORBA::INTERNAL ());
- ACE_CHECK;
-
- DsLogAdmin::LogFullActionType log_full_action =
- this->recordstore_->get_log_full_action (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- DsLogAdmin::AdministrativeState admin_state =
- this->recordstore_->get_administrative_state (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // @@ The current revision of the specification (formal/03-07-01)
- // does not explicitly specify the preference of exceptions to be
- // thrown when multiple error conditions are present.
- //
- // However, the because log is considered off duty if the log's
- // operational state is disabled or its administrative state is
- // locked, we handle the LogOffDuty exception last so the more
- // specific LogLocked and LogDisabled exceptions will be thrown.
-
- DsLogAdmin::AvailabilityStatus avail_stat =
- this->get_availability_status_i (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (admin_state == DsLogAdmin::locked)
- {
- ACE_THROW (DsLogAdmin::LogLocked ());
- }
- else if (this->op_state_ == DsLogAdmin::disabled)
- {
- ACE_THROW (DsLogAdmin::LogDisabled ());
- }
- else if (avail_stat.off_duty == 1)
- {
- ACE_THROW (DsLogAdmin::LogOffDuty ());
- }
-
- CORBA::Short num_written (0);
-
- for (CORBA::ULong i = 0; i < reclist.length (); i++)
- {
- // retval == 1 => log store reached max size.
-
- int retval = this->recordstore_->log (reclist[i] ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (retval == 1)
- {
- // The Log is full . check what the policy is and take
- // appropriate action.
- if (log_full_action == DsLogAdmin::halt)
- {
- avail_status_.log_full = 1;
- ACE_THROW (DsLogAdmin::LogFull (num_written));
- }
-
- // the policy is to wrap. for this we need to delete a few
- // records. let the record store decide how many.
-
- if (this->recordstore_->purge_old_records (ACE_ENV_SINGLE_ARG_PARAMETER) == -1)
- ACE_THROW (CORBA::PERSIST_STORE ());
-
- // Now, we want to attempt to write the same record again
- // so decrement the index to balance the inc. in the for loop.
- --i;
- }
- else if (retval == 0)
- {
- num_written++;
-
- this->check_capacity_alarm_threshold (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- }
- else
- {
- ACE_THROW (CORBA::PERSIST_STORE ());
- }
- } // for
-}
-
-void
-TAO_Log_i::set_record_attribute (DsLogAdmin::RecordId id,
- const DsLogAdmin::NVList &attr_list
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidRecordId,
- DsLogAdmin::InvalidAttribute))
-{
- ACE_WRITE_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- this->recordstore_->lock (),
- CORBA::INTERNAL ());
- ACE_CHECK;
-
- this->recordstore_->set_record_attribute (id, attr_list
- ACE_ENV_ARG_PARAMETER);
-}
-
-CORBA::ULong
-TAO_Log_i::set_records_attribute (const char *grammar,
- const char *constraint,
- const DsLogAdmin::NVList
- &attr_list ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidGrammar,
- DsLogAdmin::InvalidConstraint,
- DsLogAdmin::InvalidAttribute))
-{
- ACE_WRITE_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- this->recordstore_->lock (),
- CORBA::INTERNAL ());
- ACE_CHECK_RETURN (0);
-
- return this->recordstore_->set_records_attribute (grammar,
- constraint,
- attr_list
- ACE_ENV_ARG_PARAMETER);
-}
-
-DsLogAdmin::NVList*
-TAO_Log_i::get_record_attribute (DsLogAdmin::RecordId id
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidRecordId))
-{
- ACE_READ_GUARD_THROW_EX (ACE_SYNCH_RW_MUTEX,
- guard,
- this->recordstore_->lock (),
- CORBA::INTERNAL ());
- ACE_CHECK_RETURN (0);
-
-
- return this->recordstore_->get_record_attribute (id
- ACE_ENV_ARG_PARAMETER);
-}
-
-void
-TAO_Log_i::flush (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::UnsupportedQoS))
-{
- /// XXX locks?
- this->recordstore_->flush (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-CORBA::Boolean
-TAO_Log_i::scheduled (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- DsLogAdmin::TimeInterval interval =
- this->recordstore_->get_interval (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- TimeBase::TimeT current_time;
- ACE_Time_Value now = ACE_OS::gettimeofday ();
- ORBSVCS_Time::Time_Value_to_TimeT (current_time, now);
-
- if ((current_time >= interval.start) &&
- ((current_time <= interval.stop) || (interval.stop == 0)) )
- {
- if (weekly_intervals_.length () > 0)
- {
- // work out when sunday is in nanoseconds.
- timeval t;
- t = (timeval) now;
- struct tm *sunday;
-
- time_t clock = (time_t) t.tv_sec;
- sunday = ACE_OS::localtime (&clock);
-
- sunday->tm_sec = 0;
- sunday->tm_min = 0;
- sunday->tm_hour = 0;
- sunday->tm_mday -= sunday->tm_wday;
-
- t.tv_sec = ACE_OS::mktime (sunday) ;
- t.tv_usec = 0;
-
- TimeBase::TimeT nano_sunday =
- (CORBA::ULongLong) t.tv_sec * 10000000;
-
- for (CORBA::ULong i = 0; i < weekly_intervals_.length (); ++i)
- {
- if (current_time >= (weekly_intervals_[i].start + nano_sunday) &&
- current_time <= (weekly_intervals_[i].stop + nano_sunday))
- {
- return true;
- }
- }
- return false;
- }
- else
- return true;
- }
- else
- return false;
-}
-
-void
-TAO_Log_i::copy_attributes (DsLogAdmin::Log_ptr log
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- const DsLogAdmin::LogFullActionType log_full_action =
- this->get_log_full_action (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- log->set_log_full_action (log_full_action
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const CORBA::ULongLong max_size =
- this->get_max_size (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- log->set_max_size (max_size
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- DsLogAdmin::QoSList_var log_qos =
- this->get_log_qos (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- log->set_log_qos (log_qos.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const CORBA::ULong max_record_life =
- this->get_max_record_life (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- log->set_max_record_life (max_record_life
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const DsLogAdmin::AdministrativeState adminstrative_state =
- this->get_administrative_state (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- log->set_administrative_state (adminstrative_state
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const DsLogAdmin::ForwardingState forwarding_state =
- this->get_forwarding_state (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- log->set_forwarding_state (forwarding_state
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- const DsLogAdmin::TimeInterval interval =
- this->get_interval (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- log->set_interval (interval
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- DsLogAdmin::CapacityAlarmThresholdList_var capacity_list =
- this->get_capacity_alarm_thresholds (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- log->set_capacity_alarm_thresholds (capacity_list.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- DsLogAdmin::WeekMask_var week_mask =
- this->get_week_mask (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- log->set_week_mask (week_mask.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-TAO_Log_i::remove_old_records (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- const CORBA::ULong count =
- this->recordstore_->remove_old_records (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (count > 0)
- {
- if (avail_status_.log_full)
- {
- const CORBA::ULongLong current_size =
- this->recordstore_->get_current_size (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- const CORBA::ULongLong max_size =
- this->recordstore_->get_max_size (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (current_size < max_size)
- {
- avail_status_.log_full = 0;
- }
- }
-
- this->reset_capacity_alarm_threshold (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- }
-}
-
-void
-TAO_Log_i::check_capacity_alarm_threshold (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- const CORBA::ULongLong max_size =
- this->recordstore_->get_max_size (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (max_size != 0 && this->thresholds_.length () > 0)
- {
- const DsLogAdmin::LogFullActionType log_full_action =
- this->recordstore_->get_log_full_action (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CORBA::ULongLong current_size =
- ((log_full_action == DsLogAdmin::wrap)
- ? this->recordstore_->get_gauge (ACE_ENV_SINGLE_ARG_PARAMETER)
- : this->recordstore_->get_current_size (ACE_ENV_SINGLE_ARG_PARAMETER));
- ACE_CHECK;
-
- const CORBA::UShort percent =
- static_cast<CORBA::UShort> (((double) ACE_UINT64_DBLCAST_ADAPTER (current_size * 100U) /
- (double) ACE_UINT64_DBLCAST_ADAPTER (max_size)));
-
- while (current_threshold_ < this->thresholds_.length ()
- && this->thresholds_[this->current_threshold_] <= percent)
- {
- if (notifier_)
- {
- const DsLogNotification::PerceivedSeverityType severity =
- ((percent == 100)
- ? DsLogNotification::critical
- : DsLogNotification::minor);
-
- // @@ Calling create_log_reference () in the ctor or in ::init()
- // leads to an infinate loop. This should be removed when that
- // is fixed.
- if (CORBA::is_nil (this->log_.in ()))
- {
- this->log_ = logmgr_i_.create_log_reference (this->logid_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- notifier_->threshold_alarm (
- this->log_.in (),
- logid_,
- this->thresholds_[this->current_threshold_],
- percent,
- severity
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
- else
- {
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "threshold of %d breached\n",
- this->thresholds_[this->current_threshold_]));
- }
-
- ++this->current_threshold_;
- }
-
- // "When a log object is created with the wrap option, the
- // capacity threshold alarms are triggered as if coupled to a
- // gauge that counts from zero to the highest capacity threshold
- // value defined and then resets to zero."
- if (log_full_action == DsLogAdmin::wrap
- && this->current_threshold_ == this->thresholds_.length ())
- {
- this->recordstore_->reset_gauge ();
- this->current_threshold_ = 0;
- }
- }
-}
-
-void
-TAO_Log_i::reset_capacity_alarm_threshold (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- const CORBA::ULongLong max_size =
- this->recordstore_->get_max_size (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (max_size != 0 && this->thresholds_.length() > 0)
- {
- const DsLogAdmin::LogFullActionType log_full_action =
- this->recordstore_->get_log_full_action (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (log_full_action == DsLogAdmin::halt)
- {
- const CORBA::ULongLong current_size =
- this->recordstore_->get_current_size (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- const CORBA::UShort percent =
- static_cast<CORBA::UShort> ((((double) ACE_UINT64_DBLCAST_ADAPTER (current_size * 100U)) /
- (double) ACE_UINT64_DBLCAST_ADAPTER (max_size)));
-
- this->current_threshold_ = 0;
-
- while (this->current_threshold_ < this->thresholds_.length ()
- && this->thresholds_[this->current_threshold_] <= percent)
- ++this->current_threshold_;
- }
- }
-}
-
-CORBA::Boolean
-TAO_Log_i::validate_capacity_alarm_thresholds (
- const DsLogAdmin::CapacityAlarmThresholdList & threshs
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- for (CORBA::ULong i = 0; i < threshs.length (); i++)
- if (threshs[i] > 100)
- return false;
-
- // @@ The current revision of the specification (formal/03-07-01)
- // does not require theshold values be in order or unique. This
- // appears to be an TAO TLS implementation artifact for efficent
- // threshold checks. We could eliminate this restriction by
- // normalizing the sequence.
-
- if (threshs.length () > 1)
- for (CORBA::ULong i = 0; i < threshs.length () - 1; i++)
- if (threshs[i] >= threshs[i + 1])
- return false;
-
- return true;
-}
-
-void
-TAO_Log_i::reset_log_qos (const DsLogAdmin::QoSList& qos
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- // @@ The current revision of the specification (formal/03-07-01)
- // does not clearly define the semantics to follow when the QoSList
- // contains mutually exclusive, unsupported, or unknown properties.
- // I have submitted a defect report to the OMG for clarification.
- //
- // In the mean time, the last property found in the QoSList takes
- // presidence.
- // --jtc
-
- DsLogAdmin::QoSType qostype = DsLogAdmin::QoSNone;
-
- for (CORBA::ULong i = 0; i < qos.length (); ++i)
- {
- qostype = qos[i];
- }
-
- this->qostype_ = qostype;
-
- if (this->qostype_ == DsLogAdmin::QoSFlush)
- this->log_flush_handler_.schedule ();
- else
- this->log_flush_handler_.cancel ();
-}
-
-void
-TAO_Log_i::validate_log_qos (const DsLogAdmin::QoSList& qos
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((DsLogAdmin::UnsupportedQoS))
-{
- DsLogAdmin::QoSList denied;
-
- // validate properties..
- for (CORBA::ULong i = 0; i < qos.length (); ++i)
- {
- DsLogAdmin::QoSType qostype = qos[i];
- if (qostype != DsLogAdmin::QoSNone &&
- qostype != DsLogAdmin::QoSFlush &&
- qostype != DsLogAdmin::QoSReliability)
- {
- CORBA::ULong len = denied.length();
- denied.length(len + 1);
- denied[len] = qostype;
- }
- }
-
- // if there were any unknown/unsupported properties, thrown an
- // exception.
- if (denied.length() != 0)
- {
- ACE_THROW (DsLogAdmin::UnsupportedQoS (denied));
- }
-}
-
-void
-TAO_Log_i::reset_week_mask (const DsLogAdmin::WeekMask& masks
- ACE_ENV_ARG_DECL_NOT_USED)
-{
- CORBA::ULong count = 0;
- weekly_intervals_.length (100);
-
- // convert the weekmask into a sequence of time intervals.
- for (CORBA::ULong k = 0; k < masks.length (); ++k)
- {
- for (CORBA::ULong j = 0; j < masks[k].intervals.length (); ++j)
- {
- for (int d = 0; d < 7; ++d)
- {
- if ( (1 << d) & masks[k].days)
- {
- DsLogAdmin::TimeInterval temp_interval;
-
- temp_interval.start =
- CORBA::ULongLong (
- (d * 3600* 24) +
- (masks[k].intervals[j].start.hour * 3600) +
- (masks[k].intervals[j].start.minute * 60)) * 10000000;
-
- temp_interval.stop =
- CORBA::ULongLong (
- (d * 3600* 24) +
- (masks[k].intervals[j].stop.hour * 3600) +
- (masks[k].intervals[j].stop.minute * 60)) * 10000000;
-
- weekly_intervals_[count] = temp_interval;
- ++count;
- }
- }
- }
- }
- weekly_intervals_.length (count);
-
- //TODO: SORT AND CLEAN
-}
-
-void
-TAO_Log_i::validate_week_mask (const DsLogAdmin::WeekMask& masks
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((DsLogAdmin::InvalidTime,
- DsLogAdmin::InvalidTimeInterval,
- DsLogAdmin::InvalidMask))
-{
- for (CORBA::ULong i = 0; i < masks.length (); ++i)
- {
- if (masks[i].days > (DsLogAdmin::Sunday +
- DsLogAdmin::Monday +
- DsLogAdmin::Tuesday +
- DsLogAdmin::Wednesday +
- DsLogAdmin::Thursday +
- DsLogAdmin::Friday +
- DsLogAdmin::Saturday)
- )
- ACE_THROW (DsLogAdmin::InvalidMask ());
-
- for (CORBA::ULong j = 0; j < masks[i].intervals.length (); ++j)
- {
- if (masks[i].intervals[j].start.hour > 23 ||
- masks[i].intervals[j].start.minute > 59 ||
- masks[i].intervals[j].stop.hour > 23 ||
- masks[i].intervals[j].stop.minute > 59)
- ACE_THROW (DsLogAdmin::InvalidTime ());
-
- if (masks[i].intervals[j].stop.hour <
- masks[i].intervals[j].start.hour)
- ACE_THROW (DsLogAdmin::InvalidTimeInterval ());
-
- if (masks[i].intervals[j].stop.hour ==
- masks[i].intervals[j].start.hour &&
- masks[i].intervals[j].stop.minute <=
- masks[i].intervals[j].start.minute)
- ACE_THROW (DsLogAdmin::InvalidTimeInterval ());
- }
- }
-}
-
-
-bool
-operator==(const DsLogAdmin::CapacityAlarmThresholdList& rhs,
- const DsLogAdmin::CapacityAlarmThresholdList& lhs)
-{
- const CORBA::ULong length = rhs.length ();
-
- if (length != lhs.length ())
- {
- return false;
- }
-
- for (CORBA::ULong i = 0; i < length; ++i)
- {
- if (rhs[i] != lhs[i])
- {
- return false;
- }
- }
-
- return true;
-}
-
-bool
-operator!=(const DsLogAdmin::CapacityAlarmThresholdList& rhs,
- const DsLogAdmin::CapacityAlarmThresholdList& lhs)
-{
- return !(lhs == rhs);
-}
-
-
-bool
-operator==(const DsLogAdmin::IntervalsOfDay& rhs,
- const DsLogAdmin::IntervalsOfDay& lhs)
-{
- const CORBA::ULong length = rhs.length ();
-
- if (length != lhs.length ())
- {
- return false;
- }
-
- for (CORBA::ULong i = 0; i < length; ++i)
- {
- if (rhs[i] != lhs[i])
- {
- return false;
- }
- }
-
- return true;
-}
-
-bool
-operator!=(const DsLogAdmin::IntervalsOfDay& rhs,
- const DsLogAdmin::IntervalsOfDay& lhs)
-{
- return !(lhs == rhs);
-}
-
-
-bool
-operator==(const DsLogAdmin::QoSList& rhs,
- const DsLogAdmin::QoSList& lhs)
-{
- const CORBA::ULong length = rhs.length ();
-
- if (length != lhs.length ())
- {
- return false;
- }
-
- for (CORBA::ULong i = 0; i < length; ++i)
- {
- if (rhs[i] != lhs[i])
- {
- return false;
- }
- }
-
- return true;
-}
-
-bool
-operator!=(const DsLogAdmin::QoSList& rhs,
- const DsLogAdmin::QoSList& lhs)
-{
- return !(lhs == rhs);
-}
-
-
-bool
-operator==(const DsLogAdmin::Time24& rhs,
- const DsLogAdmin::Time24& lhs)
-{
- return (rhs.hour == lhs.hour &&
- rhs.minute == lhs.minute);
-}
-
-bool
-operator!=(const DsLogAdmin::Time24& rhs,
- const DsLogAdmin::Time24& lhs)
-{
- return !(lhs == rhs);
-}
-
-
-bool
-operator==(const DsLogAdmin::Time24Interval& rhs,
- const DsLogAdmin::Time24Interval& lhs)
-{
- return (rhs.start == lhs.start &&
- rhs.stop == lhs.stop);
-}
-
-bool
-operator!=(const DsLogAdmin::Time24Interval& rhs,
- const DsLogAdmin::Time24Interval& lhs)
-{
- return !(lhs == rhs);
-}
-
-
-bool
-operator==(const DsLogAdmin::TimeInterval& rhs,
- const DsLogAdmin::TimeInterval& lhs)
-{
- return (rhs.start == lhs.start &&
- rhs.stop == lhs.stop);
-}
-
-bool
-operator!=(const DsLogAdmin::TimeInterval& rhs,
- const DsLogAdmin::TimeInterval& lhs)
-{
- return !(lhs == rhs);
-}
-
-
-bool
-operator==(const DsLogAdmin::WeekMaskItem& rhs,
- const DsLogAdmin::WeekMaskItem& lhs)
-{
- return (rhs.days == lhs.days &&
- rhs.intervals == lhs.intervals);
-}
-
-bool
-operator!=(const DsLogAdmin::WeekMaskItem& rhs,
- const DsLogAdmin::WeekMaskItem& lhs)
-{
- return !(lhs == rhs);
-}
-
-
-bool
-operator==(const DsLogAdmin::WeekMask& rhs,
- const DsLogAdmin::WeekMask& lhs)
-{
- const CORBA::ULong length = rhs.length ();
-
- if (length != lhs.length ())
- {
- return false;
- }
-
- for (CORBA::ULong i = 0; i < length; ++i)
- {
- if (rhs[i] != lhs[i])
- {
- return false;
- }
- }
-
- return true;
-}
-
-bool
-operator!=(const DsLogAdmin::WeekMask& rhs,
- const DsLogAdmin::WeekMask& lhs)
-{
- return !(lhs == rhs);
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/orbsvcs/orbsvcs/Log/Log_i.h b/TAO/orbsvcs/orbsvcs/Log/Log_i.h
deleted file mode 100644
index 38d0ffa0e54..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/Log_i.h
+++ /dev/null
@@ -1,509 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Log_i.h
- *
- * $Id$
- *
- * Implementation of the DsLogAdmin::Log interface.
- *
- * @author Matthew Braun <mjb2@cs.wustl.edu>
- * @author Pradeep Gore <pradeep@cs.wustl.edu>
- * @author David A. Hanvey <d.hanvey@qub.ac.uk>
- */
-//=============================================================================
-
-
-#ifndef TAO_TLS_LOG_I_H
-#define TAO_TLS_LOG_I_H
-
-#include /**/ "ace/pre.h"
-
-#include "orbsvcs/Log/LogRecordStore.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "orbsvcs/Log/Log_Compaction_Handler.h"
-#include "orbsvcs/Log/Log_Flush_Handler.h"
-#include "orbsvcs/Log/LogNotification.h"
-#include "orbsvcs/Log/LogRecordStore.h"
-#include "orbsvcs/DsLogAdminS.h"
-#include "ace/Reactor.h"
-#include "orbsvcs/Log/log_serv_export.h"
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-class TAO_LogMgr_i;
-
-/**
- * @class TAO_Log_i
- *
- * @brief Used to log events to a logging server
- *
- * This implementation attempts to conform to the telecom
- * logging specification.
- */
-class TAO_Log_Serv_Export TAO_Log_i : public virtual POA_DsLogAdmin::Log
-{
-
-public:
-
- /// Constructor.
- TAO_Log_i (CORBA::ORB_ptr orb,
- TAO_LogMgr_i& logmgr_i,
- DsLogAdmin::LogMgr_ptr factory,
- DsLogAdmin::LogId id,
- TAO_LogNotification *log_notifier);
-
- /// Destructor.
- ~TAO_Log_i ();
-
- /// Initlialize the Log.
- void init (ACE_ENV_SINGLE_ARG_DECL);
-
- /**
- * @name DsLogAdmin::Log Methods
- *
- * DsLogAdmin::Log methods.
- */
- //@{
- /// Return the factory of the log.
- DsLogAdmin::LogMgr_ptr my_factory (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Return the id of the log.
- DsLogAdmin::LogId id (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Get the list of the QoS properties supported by the log.
- DsLogAdmin::QoSList*
- get_log_qos (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Set the list of the QoS properties supported by the log.
- void set_log_qos (const DsLogAdmin::QoSList & qos
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::UnsupportedQoS));
-
- /// Get the record life in seconds (0 infinite).
- CORBA::ULong
- get_max_record_life (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Set the record life in seconds (0 infinite).
- void
- set_max_record_life (CORBA::ULong life
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Get the maximum size in octets.
- CORBA::ULongLong
- get_max_size (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Set the maximum size in octets.
- void
- set_max_size (CORBA::ULongLong size
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidParam));
-
- /// Get the current size of the log in octets.
- CORBA::ULongLong
- get_current_size (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Return the number of records in the log.
- CORBA::ULongLong
- get_n_records (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Get the action to be taken when the log reaches its maximum size.
- DsLogAdmin::LogFullActionType
- get_log_full_action (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Set the action to be taken when the log reaches its maximum size.
- void
- set_log_full_action (DsLogAdmin::LogFullActionType action
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidLogFullAction));
-
- /// Get the administrative state of the log.
- DsLogAdmin::AdministrativeState
- get_administrative_state (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Set the administrative state of the log.
- void
- set_administrative_state (DsLogAdmin::AdministrativeState state
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Get the forwarding state of the log.
- /// @@ Note: is it ok to make this method virtual?
- /// @@@ Of course! get_forwarding_state() is virtual in the base
- /// class dictated by the IDL! -Ossama
- virtual DsLogAdmin::ForwardingState
- get_forwarding_state (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Set the forwarding state of the log.
- /// @@ Note: is it ok to make this method virtual?
- void
- set_forwarding_state (DsLogAdmin::ForwardingState state
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Get the operational state of the log.
- DsLogAdmin::OperationalState
- get_operational_state (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Get the log duration
- DsLogAdmin::TimeInterval
- get_interval (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Set the log duration.
- void
- set_interval (const DsLogAdmin::TimeInterval & interval
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidTime,
- DsLogAdmin::InvalidTimeInterval));
-
- /// Get the availability status
- DsLogAdmin::AvailabilityStatus
- get_availability_status (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Get the capacity alarm threshold
- DsLogAdmin::CapacityAlarmThresholdList*
- get_capacity_alarm_thresholds (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /**
- * Set the capacity alarm threshold. Threshold values represent
- * percentage levels at which the log should emit events to signal
- * that a log full or log wrap condition is approaching. If the log
- * is set to wrap, the thresholds are relative to the log size
- * between wraps (after a wrap, the percentage full resets to
- * 0).
- */
- void
- set_capacity_alarm_thresholds
- (const DsLogAdmin::CapacityAlarmThresholdList & threshs
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidThreshold));
-
- /// Get the weekly scheduling parameters
- DsLogAdmin::WeekMask*
- get_week_mask (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Set the weekly scheduling parameters.
- void
- set_week_mask (const DsLogAdmin::WeekMask & masks
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidTime,
- DsLogAdmin::InvalidTimeInterval,
- DsLogAdmin::InvalidMask));
-
- /// Returns all records in the log that match the given constraint
- /// <c>.
- DsLogAdmin::RecordList*
- query (const char * grammar,
- const char * c,
- DsLogAdmin::Iterator_out i
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidGrammar,
- DsLogAdmin::InvalidConstraint));
-
- /// Retrieve <how_many> records from time <from_time> using iterator
- /// <i>.
- DsLogAdmin::RecordList*
- retrieve (DsLogAdmin::TimeT from_time,
- CORBA::Long how_many,
- DsLogAdmin::Iterator_out i
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Returns the number of records matching constraint <c>.
- CORBA::ULong
- match (const char * grammar,
- const char * c
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidGrammar,
- DsLogAdmin::InvalidConstraint));
-
- /// Delete records matching constraint <c>.
- CORBA::ULong
- delete_records (const char * grammar,
- const char * c
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidGrammar,
- DsLogAdmin::InvalidConstraint));
-
- /// Delete records matching ids in <ids>
- CORBA::ULong
- delete_records_by_id (const DsLogAdmin::RecordIdList & ids
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-
- /// Write records to the log storage.
- void
- write_records (const DsLogAdmin::Anys & records
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::LogFull,
- DsLogAdmin::LogOffDuty,
- DsLogAdmin::LogLocked,
- DsLogAdmin::LogDisabled));
-
- /// Write a list of record ids to storage. Raises DsLogAdmin::LogFull
- /// and DsLogAdmin::LogLocked
- void
- write_recordlist (const DsLogAdmin::RecordList & list
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::LogFull,
- DsLogAdmin::LogOffDuty,
- DsLogAdmin::LogLocked,
- DsLogAdmin::LogDisabled));
-
- /// Set single record attributes.
- void
- set_record_attribute (DsLogAdmin::RecordId id,
- const DsLogAdmin::NVList & attr_list
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidRecordId,
- DsLogAdmin::InvalidAttribute));
-
- /// Set the attributes of all records that matches the
- /// constraints with same attr_list.
- CORBA::ULong
- set_records_attribute (const char * grammar,
- const char * c,
- const DsLogAdmin::NVList & attr_list
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidGrammar,
- DsLogAdmin::InvalidConstraint,
- DsLogAdmin::InvalidAttribute));
-
- /// Get the attributes of the record with id <id>. Raises
- /// DsLogAdmin::InvalidRecordId
- DsLogAdmin::NVList*
- get_record_attribute (DsLogAdmin::RecordId id
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::InvalidRecordId));
-
- /// Causes all pending events to be written to storage. Raises
- /// DsLogAdmin::UnsupportedQos
- void
- flush (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- DsLogAdmin::UnsupportedQoS));
- //@}
-
- /// Remove records that have exceeded max_record_life_.
- void remove_old_records (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-protected:
- /// Get the availability status
- /// @note must be called with locks held
- DsLogAdmin::AvailabilityStatus
- get_availability_status_i (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Tells if the Log is scheduled to run now.
- /// @note must be called with locks held
- CORBA::Boolean scheduled (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Copy the attributes of the log being passed.
- void copy_attributes (DsLogAdmin::Log_ptr log
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Check if threshold reached.
- void check_capacity_alarm_threshold (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Reset capacity alarm threshold.
- void reset_capacity_alarm_threshold (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Check that valid threshold values have been given.
- static CORBA::Boolean validate_capacity_alarm_thresholds (
- const DsLogAdmin::CapacityAlarmThresholdList & threshs
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Reset Log QoS
- void reset_log_qos (const DsLogAdmin::QoSList& qos
- ACE_ENV_ARG_DECL);
-
- /// Validate log QoS
- void validate_log_qos (const DsLogAdmin::QoSList& qos
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((DsLogAdmin::UnsupportedQoS));
-
- /// Reset Week Mask
- ///
- /// Used to initialize internal data structures that represent the
- /// week mask list when the log service starts, and to reinitialize
- /// them when they are changed.
- ///
- void reset_week_mask (const DsLogAdmin::WeekMask& masks
- ACE_ENV_ARG_DECL);
-
- /// Validate Week Mask
- ///
- /// Used to check whether week mask is valid. If not, throws an
- /// InvalidTime, InvalidTimeInterval, or InvalidMask exception.
- ///
- void validate_week_mask (const DsLogAdmin::WeekMask& masks
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((DsLogAdmin::InvalidTime,
- DsLogAdmin::InvalidTimeInterval,
- DsLogAdmin::InvalidMask));
-
-protected:
- /// Reference to the LogMgr servant
- TAO_LogMgr_i& logmgr_i_;
-
- /// The log's object reference
- DsLogAdmin::Log_var log_;
-
- /// The log's factory's object reference
- DsLogAdmin::LogMgr_var factory_;
-
- /// The log's id
- DsLogAdmin::LogId logid_;
-
- /// The log's operational state
- DsLogAdmin::OperationalState op_state_;
-
- /// The log's availability status
- DsLogAdmin::AvailabilityStatus avail_status_;
-
- /// The list of points at which the log should generate events
- /// indicating approaching full capacity
- DsLogAdmin::CapacityAlarmThresholdList thresholds_;
-
- /// The next capacity alarm threshold.
- CORBA::ULong current_threshold_;
-
- /// A Sequence of the weekly intervals when the log is in operation.
- DsLogAdmin::TimeIntervalSeq weekly_intervals_;
-
- /// The QoS type of the log
- DsLogAdmin::QoSType qostype_;
-
- /// The reactor used for timing (startup and shutdown), etc
- ACE_Reactor *reactor_;
-
- /// The storage for all the records
- TAO_LogRecordStore* recordstore_;
-
- /// For sending Log Generated events.
- TAO_LogNotification* notifier_;
-
- /// Log Compaction Handler
- TAO_Log_Compaction_Handler log_compaction_handler_;
-
- /// Log Compaction Interval
- static const ACE_Time_Value log_compaction_interval_;
-
- /// Log Flush Handler
- TAO_Log_Flush_Handler log_flush_handler_;
-
- /// Log Flush Interval
- static const ACE_Time_Value log_flush_interval_;
-};
-
-bool TAO_Log_Serv_Export
-operator==(const DsLogAdmin::CapacityAlarmThresholdList& rhs,
- const DsLogAdmin::CapacityAlarmThresholdList& lhs);
-
-bool TAO_Log_Serv_Export
-operator!=(const DsLogAdmin::CapacityAlarmThresholdList& rhs,
- const DsLogAdmin::CapacityAlarmThresholdList& lhs);
-
-bool TAO_Log_Serv_Export
-operator==(const DsLogAdmin::IntervalsOfDay& rhs,
- const DsLogAdmin::IntervalsOfDay& lhs);
-
-bool TAO_Log_Serv_Export
-operator!=(const DsLogAdmin::IntervalsOfDay& rhs,
- const DsLogAdmin::IntervalsOfDay& lhs);
-
-bool TAO_Log_Serv_Export
-operator==(const DsLogAdmin::QoSList& rhs,
- const DsLogAdmin::QoSList& lhs);
-
-bool TAO_Log_Serv_Export
-operator!=(const DsLogAdmin::QoSList& rhs,
- const DsLogAdmin::QoSList& lhs);
-
-bool TAO_Log_Serv_Export
-operator==(const DsLogAdmin::Time24& rhs,
- const DsLogAdmin::Time24& lhs);
-
-bool TAO_Log_Serv_Export
-operator!=(const DsLogAdmin::Time24& rhs,
- const DsLogAdmin::Time24& lhs);
-
-bool TAO_Log_Serv_Export
-operator==(const DsLogAdmin::Time24Interval& rhs,
- const DsLogAdmin::Time24Interval& lhs);
-
-bool TAO_Log_Serv_Export
-operator!=(const DsLogAdmin::Time24Interval& rhs,
- const DsLogAdmin::Time24Interval& lhs);
-
-bool TAO_Log_Serv_Export
-operator==(const DsLogAdmin::TimeInterval& rhs,
- const DsLogAdmin::TimeInterval& lhs);
-
-bool TAO_Log_Serv_Export
-operator!=(const DsLogAdmin::TimeInterval& rhs,
- const DsLogAdmin::TimeInterval& lhs);
-
-bool TAO_Log_Serv_Export
-operator==(const DsLogAdmin::WeekMaskItem& rhs,
- const DsLogAdmin::WeekMaskItem& lhs);
-
-bool TAO_Log_Serv_Export
-operator!=(const DsLogAdmin::WeekMaskItem& rhs,
- const DsLogAdmin::WeekMaskItem& lhs);
-
-bool TAO_Log_Serv_Export
-operator==(const DsLogAdmin::WeekMask& rhs,
- const DsLogAdmin::WeekMask& lhs);
-
-bool TAO_Log_Serv_Export
-operator!=(const DsLogAdmin::WeekMask& rhs,
- const DsLogAdmin::WeekMask& lhs);
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#include /**/ "ace/post.h"
-
-#endif /* TAO_TLS_LOG_I_H */
diff --git a/TAO/orbsvcs/orbsvcs/Log/NotifyLogConsumer.cpp b/TAO/orbsvcs/orbsvcs/Log/NotifyLogConsumer.cpp
deleted file mode 100644
index 97f1a9803f1..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/NotifyLogConsumer.cpp
+++ /dev/null
@@ -1,144 +0,0 @@
-#include "orbsvcs/Log/NotifyLog_i.h"
-#include "orbsvcs/Log/LogMgr_i.h"
-#include "orbsvcs/Log/LogNotification.h"
-
-ACE_RCSID (Log,
- NotifyLogConsumer,
- "$Id$")
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-TAO_Notify_LogConsumer::TAO_Notify_LogConsumer (TAO_NotifyLog_i *log)
-: log_ (log)
-{
-}
-
-TAO_Notify_LogConsumer::~TAO_Notify_LogConsumer (void)
-{
-}
-
-void
-TAO_Notify_LogConsumer::connect (
- CosNotifyChannelAdmin::ConsumerAdmin_ptr consumer_admin
- ACE_ENV_ARG_DECL)
-{
- // Activate the consumer with the default_POA_
- CosNotifyComm::PushConsumer_var objref =
- this->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- CosNotifyChannelAdmin::ProxySupplier_var proxysupplier =
- consumer_admin->obtain_notification_push_supplier (CosNotifyChannelAdmin::ANY_EVENT, proxy_supplier_id_ ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_ASSERT (!CORBA::is_nil (proxysupplier.in ()));
-
- // narrow
- this->proxy_supplier_ =
- CosNotifyChannelAdmin::ProxyPushSupplier::
- _narrow (proxysupplier.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_ASSERT (!CORBA::is_nil (proxy_supplier_.in ()));
-
- proxy_supplier_->connect_any_push_consumer (objref.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
-}
-
-void
-TAO_Notify_LogConsumer::disconnect (ACE_ENV_SINGLE_ARG_DECL)
-{
- this->proxy_supplier_->
- disconnect_push_supplier(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-TAO_Notify_LogConsumer::offer_change
- (const CosNotification::EventTypeSeq & /*added*/,
- const CosNotification::EventTypeSeq & /*removed*/
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- CosNotifyComm::InvalidEventType
- ))
-{
- // No-Op.
-}
-
-void
-TAO_Notify_LogConsumer::push
- (const CORBA::Any& event
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- CosEventComm::Disconnected
- ))
-{
- // create a record list...
- DsLogAdmin::RecordList recList (1);
- recList.length (1);
-
- recList [0].info = event;
-
- // @@ The current revision of the specification (formal/03-07-01)
- // states:
- //
- // * When a push operation is invoked and a log is full, then a
- // NO_RESOURCE (sic) SystemException is raised with a LOGFULL
- // minor code.
- //
- // * When a push operation is invoked on a log that is off-duty,
- // then a NO_RESOURCE (sic) SystemException is raised with a
- // LOGOFFDUTY minor code.
- //
- // * When a push operation is invoked on a log that is locked, then
- // a NO_PERMISSIONS (sic) SystemException is raised with a LOGLOCKED
- // minor code.
- //
- // * When a push operation is invoked on a log that is disabled,
- // then a TRANSIENT SystemException is raised with a LOGDISABLED
- // minor code.
- //
- // But neither the Telecom Logging or the CORBA specification define
- // the values for these minor codes.
- //
- // I have submitted a defect report to the OMG for clarification.
- // --jtc
- ACE_TRY
- {
- // log the RecordList.
- this->log_->write_recordlist (recList ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (DsLogAdmin::LogFull, ex)
- {
- ACE_THROW (CORBA::NO_RESOURCES ());
- }
- ACE_CATCH (DsLogAdmin::LogOffDuty, ex)
- {
- ACE_THROW (CORBA::NO_RESOURCES ());
- }
- ACE_CATCH (DsLogAdmin::LogLocked, ex)
- {
- ACE_THROW (CORBA::NO_PERMISSION ());
- }
- ACE_CATCH (DsLogAdmin::LogDisabled, ex)
- {
- ACE_THROW (CORBA::TRANSIENT ());
- }
- ACE_ENDTRY;
-}
-
-void
-TAO_Notify_LogConsumer::disconnect_push_consumer
- (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/orbsvcs/orbsvcs/Log/NotifyLogConsumer.h b/TAO/orbsvcs/orbsvcs/Log/NotifyLogConsumer.h
deleted file mode 100644
index c464e91f8d4..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/NotifyLogConsumer.h
+++ /dev/null
@@ -1,117 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file NotifyLogConsumer.h
- *
- * $Id$
- *
- * The NotifyLogConsumer connects to the NotifyLog and logs the events
- * that are pushed to the NotifyLog.
- *
- * @author David A. Hanvey <d.hanvey@qub.ac.uk>
- */
-//=============================================================================
-
-#ifndef TAO_TLS_NOTIFYLOGCONSUMER_H
-#define TAO_TLS_NOTIFYLOGCONSUMER_H
-
-#include /**/ "ace/pre.h"
-
-#include "orbsvcs/DsLogAdminS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "orbsvcs/DsNotifyLogAdminS.h"
-#include "orbsvcs/Log/Log_i.h"
-
-#include "orbsvcs/Log/notifylog_serv_export.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-class TAO_LogMgr_i;
-class TAO_NotifyLog_i;
-class TAO_NotifyLogFactory_i;
-
-/**
- * @class TAO_Notify_LogConsumer
- *
- * @brief An implementation of the PushConsumer interface.
- *
- * Connects to the NotifyLog and writes LogRecords to the
- * Log when events are 'pushed' to the NotifyLog which is an
- * EventChannel.
- */
-class TAO_Notify_LogConsumer :
- public virtual POA_CosNotifyComm::PushConsumer
-{
-public:
- // = Initialization and Termination methods.
-
- /// Constructor.
- TAO_Notify_LogConsumer (TAO_NotifyLog_i *log);
-
- /// Connect to NotifyLog.
- void connect (CosNotifyChannelAdmin::ConsumerAdmin_ptr consumer_admin ACE_ENV_ARG_DECL);
-
- /// Disconnect from NotifyLog.
- virtual void disconnect (ACE_ENV_SINGLE_ARG_DECL);
-
-protected:
- /// Destructor.
- virtual ~TAO_Notify_LogConsumer (void);
-
- // = NotifyPublish method
- virtual void offer_change (
- const CosNotification::EventTypeSeq & added,
- const CosNotification::EventTypeSeq & removed
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- CosNotifyComm::InvalidEventType
- ));
-
- // = PushSupplier methods
- virtual void push (
- const CORBA::Any & event
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- CosEventComm::Disconnected
- ));
-
- virtual void disconnect_push_consumer (
- ACE_ENV_SINGLE_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- /// ProxyPushSupplier used to connect to NotifyLog.
- CosNotifyChannelAdmin::ProxyPushSupplier_var proxy_supplier_;
-
- /// The ID of the proxySupplier.
- CosNotifyChannelAdmin::ProxyID proxy_supplier_id_;
-
- /// The NotifyLog that this consumer connects to
- /// and whose events are to be logged.
- TAO_NotifyLog_i *log_;
-};
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_TLS_NOTIFYLOGCONSUMER_H */
diff --git a/TAO/orbsvcs/orbsvcs/Log/NotifyLogFactory_i.cpp b/TAO/orbsvcs/orbsvcs/Log/NotifyLogFactory_i.cpp
deleted file mode 100644
index 32af058cd1c..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/NotifyLogFactory_i.cpp
+++ /dev/null
@@ -1,462 +0,0 @@
-#include "orbsvcs/Log/NotifyLogFactory_i.h"
-#include "orbsvcs/Log/LogNotification.h"
-#include "orbsvcs/Log/NotifyLogNotification.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID (Log,
- NotifyLogFactory_i,
- "$Id$")
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-TAO_NotifyLogFactory_i::TAO_NotifyLogFactory_i (void)
-{
-}
-
-TAO_NotifyLogFactory_i::TAO_NotifyLogFactory_i (CosNotifyChannelAdmin::EventChannelFactory_ptr ecf)
-: notify_factory_ (ecf)
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- CosNotifyChannelAdmin::ChannelID id;
- CosNotifyChannelAdmin::AdminID adminID = 0;
- CosNotification::QoSProperties initial_qos;
- CosNotification::AdminProperties initial_admin;
-
- this->event_channel_ =
- this->notify_factory_->create_channel (initial_qos,
- initial_admin,
- id
- ACE_ENV_ARG_PARAMETER);
-
- this->consumer_admin_ = this->event_channel_->new_for_consumers(CosNotifyChannelAdmin::OR_OP, adminID);
-
- CosNotification::EventTypeSeq added(1);
- CosNotification::EventTypeSeq removed (0);
- added.length (1);
- removed.length (0);
-
- added[0].domain_name = CORBA::string_dup ("*");
- added[0].type_name = CORBA::string_dup ("*");
-
- this->consumer_admin_->subscription_change (added, removed ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_NEW_THROW_EX (this->notifier_,
- TAO_NotifyLogNotification(this->event_channel_.in ()),
- CORBA::NO_MEMORY ());
-}
-
-TAO_NotifyLogFactory_i::~TAO_NotifyLogFactory_i()
-{
- // No-Op.
-}
-
-DsNotifyLogAdmin::NotifyLogFactory_ptr
-TAO_NotifyLogFactory_i::activate (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa
- ACE_ENV_ARG_DECL)
-{
- TAO_LogMgr_i::init (orb, poa ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsNotifyLogAdmin::NotifyLogFactory::_nil ());
-
-
- PortableServer::ObjectId_var oid =
- this->factory_poa_->activate_object (this
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsNotifyLogAdmin::NotifyLogFactory::_nil ());
-
- CORBA::Object_var obj =
- this->factory_poa_->id_to_reference (oid.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsNotifyLogAdmin::NotifyLogFactory::_nil ());
-
- // narrow and store the result..
- this->log_mgr_ =
- DsLogAdmin::LogMgr::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsNotifyLogAdmin::NotifyLogFactory::_nil ());
-
- DsNotifyLogAdmin::NotifyLogFactory_var v_return =
- DsNotifyLogAdmin::NotifyLogFactory::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsNotifyLogAdmin::NotifyLogFactory::_nil ());
-
- return v_return._retn ();
-}
-
-DsNotifyLogAdmin::NotifyLog_ptr
-TAO_NotifyLogFactory_i::create (
- DsLogAdmin::LogFullActionType full_action,
- CORBA::ULongLong max_size,
- const DsLogAdmin::CapacityAlarmThresholdList & thresholds,
- const CosNotification::QoSProperties & initial_qos,
- const CosNotification::AdminProperties & initial_admin,
- DsLogAdmin::LogId_out id_out
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- DsLogAdmin::InvalidLogFullAction,
- DsLogAdmin::InvalidThreshold,
- CosNotification::UnsupportedQoS,
- CosNotification::UnsupportedAdmin
- ))
-{
- ACE_UNUSED_ARG (initial_qos);
- ACE_UNUSED_ARG (initial_admin);
-
- this->create_i (full_action,
- max_size,
- & thresholds,
- id_out
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsNotifyLogAdmin::NotifyLog::_nil ());
- DsLogAdmin::LogId id = id_out;
-
-#if (TAO_HAS_MINIMUM_POA == 0)
- DsLogAdmin::Log_var log =
- this->create_log_reference (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsNotifyLogAdmin::NotifyLog::_nil ());
-#else
- DsLogAdmin::Log_var log =
- this->create_log_object (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsNotifyLogAdmin::NotifyLog::_nil ());
-#endif
-
- // narrow to NotifyLog
- DsNotifyLogAdmin::NotifyLog_var notify_log =
- DsNotifyLogAdmin::NotifyLog::_narrow (log.in ());
-
- // @@ JTC - squelch exception?
- notifier_->object_creation (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsNotifyLogAdmin::NotifyLog::_nil ());
-
- return notify_log._retn ();
-}
-
-DsNotifyLogAdmin::NotifyLog_ptr
-TAO_NotifyLogFactory_i::create_with_id (
- DsLogAdmin::LogId id,
- DsLogAdmin::LogFullActionType full_action,
- CORBA::ULongLong max_size,
- const DsLogAdmin::CapacityAlarmThresholdList & thresholds,
- const CosNotification::QoSProperties & initial_qos,
- const CosNotification::AdminProperties & initial_admin
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- DsLogAdmin::LogIdAlreadyExists,
- DsLogAdmin::InvalidLogFullAction,
- DsLogAdmin::InvalidThreshold,
- CosNotification::UnsupportedQoS,
- CosNotification::UnsupportedAdmin
- ))
-{
- ACE_UNUSED_ARG (initial_qos);
- ACE_UNUSED_ARG (initial_admin);
-
- this->create_with_id_i (id,
- full_action,
- max_size,
- & thresholds
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsNotifyLogAdmin::NotifyLog::_nil ());
-
-#if (TAO_HAS_MINIMUM_POA == 0)
- DsLogAdmin::Log_var log =
- this->create_log_reference (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsNotifyLogAdmin::NotifyLog::_nil ());
-#else
- DsLogAdmin::Log_var log =
- this->create_log_object (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsNotifyLogAdmin::NotifyLog::_nil ());
-#endif
-
- // narrow to NotifyLog
- DsNotifyLogAdmin::NotifyLog_var notify_log =
- DsNotifyLogAdmin::NotifyLog::_narrow (log.in ());
-
- // @@ JTC - squelch exception?
- notifier_->object_creation (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsNotifyLogAdmin::NotifyLog::_nil ());
-
- return notify_log._retn();
-}
-
-CORBA::RepositoryId
-TAO_NotifyLogFactory_i::create_repositoryid ()
-{
- return CORBA::string_dup("IDL:omg.org/DsNotifyLogAdmin:NotifyLog:1.0");
-}
-
-PortableServer::ServantBase*
-TAO_NotifyLogFactory_i::create_log_servant (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL)
-{
- TAO_NotifyLog_i* notify_log_i;
-
- ACE_NEW_THROW_EX (notify_log_i,
- TAO_NotifyLog_i (this->orb_.in (),
- this->log_poa_.in (),
- *this,
- this->log_mgr_.in (),
- this->notify_factory_.in (),
- this->notifier_,
- id
- ),
- CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (0);
-
- notify_log_i->init (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- //initialise the LogConsumer object
- notify_log_i->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- return notify_log_i;
-}
-
-CosNotifyChannelAdmin::AdminID
-TAO_NotifyLogFactory_i::MyID (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return consumer_admin_->MyID (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-CosNotifyChannelAdmin::EventChannel_ptr
-TAO_NotifyLogFactory_i::MyChannel (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- ACE_THROW_RETURN (CORBA::NO_IMPLEMENT(), 0);
-}
-
-CosNotifyChannelAdmin::InterFilterGroupOperator
-TAO_NotifyLogFactory_i::MyOperator (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return consumer_admin_->MyOperator (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-CosNotifyFilter::MappingFilter_ptr
-TAO_NotifyLogFactory_i::priority_filter (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return consumer_admin_->priority_filter (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-void
-TAO_NotifyLogFactory_i::priority_filter (CosNotifyFilter::MappingFilter_ptr filter ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- consumer_admin_->priority_filter(filter ACE_ENV_ARG_PARAMETER);
-}
-
-CosNotifyFilter::MappingFilter_ptr
-TAO_NotifyLogFactory_i::lifetime_filter (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return consumer_admin_->lifetime_filter (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-void
-TAO_NotifyLogFactory_i::lifetime_filter (CosNotifyFilter::MappingFilter_ptr filter ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- consumer_admin_->lifetime_filter (filter ACE_ENV_ARG_PARAMETER);
-}
-
-CosNotifyChannelAdmin::ProxyIDSeq*
-TAO_NotifyLogFactory_i::pull_suppliers (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return consumer_admin_->pull_suppliers (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-CosNotifyChannelAdmin::ProxyIDSeq*
-TAO_NotifyLogFactory_i::push_suppliers (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return consumer_admin_->push_suppliers (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-CosNotifyChannelAdmin::ProxySupplier_ptr
-TAO_NotifyLogFactory_i::get_proxy_supplier (
- CosNotifyChannelAdmin::ProxyID proxy_id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CosNotifyChannelAdmin::ProxyNotFound,
- CORBA::SystemException
- ))
-{
- return consumer_admin_->get_proxy_supplier (proxy_id ACE_ENV_ARG_PARAMETER);
-}
-
-CosNotifyChannelAdmin::ProxySupplier_ptr
-TAO_NotifyLogFactory_i::obtain_notification_pull_supplier (
- CosNotifyChannelAdmin::ClientType ctype,
- CosNotifyChannelAdmin::ProxyID& proxy_id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CosNotifyChannelAdmin::AdminLimitExceeded,
- CORBA::SystemException
- ))
-{
- return consumer_admin_->obtain_notification_pull_supplier (ctype, proxy_id ACE_ENV_ARG_PARAMETER);
-}
-
-CosNotifyChannelAdmin::ProxySupplier_ptr
-TAO_NotifyLogFactory_i::obtain_notification_push_supplier (
- CosNotifyChannelAdmin::ClientType ctype,
- CosNotifyChannelAdmin::ProxyID& proxy_id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CosNotifyChannelAdmin::AdminLimitExceeded,
- CORBA::SystemException
- ))
-{
- return consumer_admin_->obtain_notification_push_supplier (ctype, proxy_id ACE_ENV_ARG_PARAMETER);
-}
-
-CosEventChannelAdmin::ProxyPushSupplier_ptr
-TAO_NotifyLogFactory_i::obtain_push_supplier (
- ACE_ENV_SINGLE_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return consumer_admin_->obtain_push_supplier (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-
-
-CosEventChannelAdmin::ProxyPullSupplier_ptr
-TAO_NotifyLogFactory_i::obtain_pull_supplier (
- ACE_ENV_SINGLE_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-
-{
- return consumer_admin_->obtain_pull_supplier (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-void
-TAO_NotifyLogFactory_i::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- // No-Op.
-}
-
-//CosNotifyComm::NotifySubscribe
-void
-TAO_NotifyLogFactory_i::subscription_change (const CosNotification::EventTypeSeq& added,
- const CosNotification::EventTypeSeq& removed
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CosNotifyComm::InvalidEventType,
- CORBA::SystemException
- ))
-{
- consumer_admin_->subscription_change (added, removed ACE_ENV_ARG_PARAMETER);
-}
-
-CosNotification::QoSProperties*
-TAO_NotifyLogFactory_i::get_qos (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return consumer_admin_->get_qos (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-void
-TAO_NotifyLogFactory_i::set_qos (const CosNotification::QoSProperties& qos ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CosNotification::UnsupportedQoS,
- CORBA::SystemException
- ))
-{
- consumer_admin_->set_qos (qos ACE_ENV_ARG_PARAMETER);
-}
-
-void
-TAO_NotifyLogFactory_i::validate_qos (const CosNotification::QoSProperties& required_qos,
- CosNotification::NamedPropertyRangeSeq_out available_qos
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CosNotification::UnsupportedQoS,
- CORBA::SystemException
- ))
-{
- consumer_admin_->validate_qos (required_qos, available_qos ACE_ENV_ARG_PARAMETER);
-}
-
-CosNotifyFilter::FilterID
-TAO_NotifyLogFactory_i::add_filter (CosNotifyFilter::Filter_ptr filter ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return consumer_admin_->add_filter (filter ACE_ENV_ARG_PARAMETER);
-}
-
-void
-TAO_NotifyLogFactory_i::remove_filter (CosNotifyFilter::FilterID id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- consumer_admin_->remove_filter (id ACE_ENV_ARG_PARAMETER);
-}
-
-CosNotifyFilter::Filter_ptr
-TAO_NotifyLogFactory_i::get_filter (CosNotifyFilter::FilterID id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CosNotifyFilter::FilterNotFound,
- CORBA::SystemException
- ))
-{
- return consumer_admin_->get_filter (id ACE_ENV_ARG_PARAMETER);
-}
-
-CosNotifyFilter::FilterIDSeq*
-TAO_NotifyLogFactory_i::get_all_filters (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return consumer_admin_->get_all_filters (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-void
-TAO_NotifyLogFactory_i::remove_all_filters (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- consumer_admin_->remove_all_filters (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/orbsvcs/orbsvcs/Log/NotifyLogFactory_i.h b/TAO/orbsvcs/orbsvcs/Log/NotifyLogFactory_i.h
deleted file mode 100644
index bbe8127c077..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/NotifyLogFactory_i.h
+++ /dev/null
@@ -1,281 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file NotifyLogFactory_i.h
- *
- * $Id$
- *
- * Implements the Factory for NotifyLog Objects.
- *
- *
- * @author David A. Hanvey <d.hanvey@qub.ac.uk>
- */
-//=============================================================================
-
-#ifndef TAO_TLS_NOTIFYLOGFACTORY_I_H
-#define TAO_TLS_NOTIFYLOGFACTORY_I_H
-
-#include /**/ "ace/pre.h"
-
-#include "orbsvcs/DsNotifyLogAdminS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "orbsvcs/DsLogAdminS.h"
-#include "orbsvcs/Log/LogMgr_i.h"
-#include "orbsvcs/Log/NotifyLog_i.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-class TAO_NotifyLog_i;
-class TAO_NotifyLogNotification;
-
-/**
- * @class TAO_NotifyLogFactory_i
- *
- * @brief The NotifyLogFactory is a factory that is used to create NotifyLogs which are event-aware.
- */
-class TAO_NotifyLog_Serv_Export TAO_NotifyLogFactory_i :
- public POA_DsNotifyLogAdmin::NotifyLogFactory,
- public TAO_LogMgr_i
-{
-public:
- //= Initialization and termination code.
-
- /// Constructor - default.
- TAO_NotifyLogFactory_i (void);
-
- /// Constructor.
- TAO_NotifyLogFactory_i (CosNotifyChannelAdmin::EventChannelFactory_ptr ecf);
-
- /// Destructor.
- ~TAO_NotifyLogFactory_i ();
-
- /// Activate this servant with the ORB and POA passed in.
- DsNotifyLogAdmin::NotifyLogFactory_ptr
- activate (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa
- ACE_ENV_ARG_DECL);
-
- /// Used to create an NotifyLog.
- DsNotifyLogAdmin::NotifyLog_ptr create (
- DsLogAdmin::LogFullActionType full_action,
- CORBA::ULongLong max_size,
- const DsLogAdmin::CapacityAlarmThresholdList & thresholds,
- const CosNotification::QoSProperties & initial_qos,
- const CosNotification::AdminProperties & initial_admin,
- DsLogAdmin::LogId_out id
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- DsLogAdmin::InvalidLogFullAction,
- DsLogAdmin::InvalidThreshold,
- CosNotification::UnsupportedQoS,
- CosNotification::UnsupportedAdmin
- ));
-
- /// Same as create (), but allows clients to specify the id.
- DsNotifyLogAdmin::NotifyLog_ptr create_with_id (
- DsLogAdmin::LogId id,
- DsLogAdmin::LogFullActionType full_action,
- CORBA::ULongLong max_size,
- const DsLogAdmin::CapacityAlarmThresholdList & thresholds,
- const CosNotification::QoSProperties & initial_qos,
- const CosNotification::AdminProperties & initial_admin
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- DsLogAdmin::LogIdAlreadyExists,
- DsLogAdmin::InvalidLogFullAction,
- DsLogAdmin::InvalidThreshold,
- CosNotification::UnsupportedQoS,
- CosNotification::UnsupportedAdmin
- ));
-
-
- // = Methods from CosNotifyChannelAdmin::ConsumerAdmin.
- CosNotifyChannelAdmin::AdminID MyID (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- CosNotifyChannelAdmin::EventChannel_ptr MyChannel (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- CosNotifyChannelAdmin::InterFilterGroupOperator MyOperator (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- CosNotifyFilter::MappingFilter_ptr priority_filter (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
- void priority_filter (CosNotifyFilter::MappingFilter_ptr ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- CosNotifyFilter::MappingFilter_ptr lifetime_filter (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
- void lifetime_filter (CosNotifyFilter::MappingFilter_ptr ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- CosNotifyChannelAdmin::ProxyIDSeq* pull_suppliers (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
- CosNotifyChannelAdmin::ProxyIDSeq* push_suppliers (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- CosNotifyChannelAdmin::ProxySupplier_ptr get_proxy_supplier (
- CosNotifyChannelAdmin::ProxyID proxy_id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CosNotifyChannelAdmin::ProxyNotFound,
- CORBA::SystemException
- ));
-
- CosNotifyChannelAdmin::ProxySupplier_ptr obtain_notification_pull_supplier (
- CosNotifyChannelAdmin::ClientType ctype,
- CosNotifyChannelAdmin::ProxyID& proxy_id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CosNotifyChannelAdmin::AdminLimitExceeded,
- CORBA::SystemException
- ));
-
- CosNotifyChannelAdmin::ProxySupplier_ptr obtain_notification_push_supplier (
- CosNotifyChannelAdmin::ClientType ctype,
- CosNotifyChannelAdmin::ProxyID& id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CosNotifyChannelAdmin::AdminLimitExceeded,
- CORBA::SystemException
- ));
-
- CosEventChannelAdmin::ProxyPushSupplier_ptr obtain_push_supplier (
- ACE_ENV_SINGLE_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- CosEventChannelAdmin::ProxyPullSupplier_ptr obtain_pull_supplier (
- ACE_ENV_SINGLE_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- void destroy (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- /// CosNotifyComm::NotifySubscribe.
- void subscription_change (const CosNotification::EventTypeSeq& added,
- const CosNotification::EventTypeSeq& removed
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CosNotifyComm::InvalidEventType,
- CORBA::SystemException
- ));
-
- /// CosNotification::QoSAdmin.
- CosNotification::QoSProperties* get_qos (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
- void set_qos (const CosNotification::QoSProperties& ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CosNotification::UnsupportedQoS,
- CORBA::SystemException
- ));
- void validate_qos (const CosNotification::QoSProperties&,
- CosNotification::NamedPropertyRangeSeq_out
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CosNotification::UnsupportedQoS,
- CORBA::SystemException
- ));
-
- /// CosNotifyFilter::FilterAdmin.
- CosNotifyFilter::FilterID add_filter (CosNotifyFilter::Filter_ptr ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
- void remove_filter (CosNotifyFilter::FilterID ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
- CosNotifyFilter::Filter_ptr get_filter (CosNotifyFilter::FilterID ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CosNotifyFilter::FilterNotFound,
- CORBA::SystemException
- ));
- CosNotifyFilter::FilterIDSeq* get_all_filters (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
- void remove_all_filters (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
-protected:
- virtual CORBA::RepositoryId
- create_repositoryid ();
-
- virtual PortableServer::ServantBase*
- create_log_servant (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL);
-
- /// Our object ref. after <active>ation.
- DsLogAdmin::LogMgr_var log_mgr_;
-
- /// The Channel ID.
- CosNotifyChannelAdmin::ChannelID channel_id_;
-
- /// The EventChannel the factory uses to enable the
- /// NotifyLogNotification object to connect to and send
- /// log-generated events.
- CosNotifyChannelAdmin::EventChannel_var event_channel_;
-
- /// The ConsumerAdmin that the NotifyLogFactory supports.
- CosNotifyChannelAdmin::ConsumerAdmin_var consumer_admin_;
-
- //CosEventChannelAdmin::EventChannel_var es_event_channel_;
-
- //CosEventChannelAdmin::ConsumerAdmin_var es_consumer_admin_;
-
- /// Used for log-generated events.
- TAO_NotifyLogNotification* notifier_;
-
- /// The EventChannelFactory used to create an EventChannel.
- CosNotifyChannelAdmin::EventChannelFactory_var notify_factory_;
-};
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_TLS_NOTIFYLOGFACTORY_I_H */
diff --git a/TAO/orbsvcs/orbsvcs/Log/NotifyLogNotification.cpp b/TAO/orbsvcs/orbsvcs/Log/NotifyLogNotification.cpp
deleted file mode 100644
index 1a3762a4d51..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/NotifyLogNotification.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-#include "orbsvcs/Log/LogNotification.h"
-#include "orbsvcs/Log/NotifyLogNotification.h"
-#include "orbsvcs/Time_Utilities.h"
-#include "tao/debug.h"
-
-ACE_RCSID (Log,
- NotifyLogNotification,
- "$Id$")
-
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-TAO_NotifyLogNotification::TAO_NotifyLogNotification (
- CosNotifyChannelAdmin::EventChannel_ptr ec)
- : TAO_LogNotification (),
- event_channel_ (CosNotifyChannelAdmin::EventChannel::_duplicate (ec))
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- CosNotifyComm::PushSupplier_var objref =
- this->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- ACE_ASSERT (!CORBA::is_nil (objref.in ()));
-
- CosNotifyChannelAdmin::AdminID adminID;
- CosNotifyChannelAdmin::SupplierAdmin_var supplier_admin =
- this->event_channel_->new_for_suppliers (CosNotifyChannelAdmin::OR_OP, adminID);
-
- ACE_ASSERT (!CORBA::is_nil (supplier_admin.in ()));
-
- CosNotifyChannelAdmin::ProxyConsumer_var proxyconsumer =
- supplier_admin->obtain_notification_push_consumer (CosNotifyChannelAdmin::ANY_EVENT, proxy_consumer_id_ ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_ASSERT (!CORBA::is_nil (proxyconsumer.in ()));
-
- // narrow
- this->proxy_consumer_ =
- CosNotifyChannelAdmin::ProxyPushConsumer::_narrow (proxyconsumer.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_ASSERT (!CORBA::is_nil (this->proxy_consumer_.in ()));
-
- proxy_consumer_->connect_any_push_supplier (objref.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-TAO_NotifyLogNotification::~TAO_NotifyLogNotification (void)
-{
- // No-Op.
-}
-
-void
-TAO_NotifyLogNotification::send_notification (const CORBA::Any& any)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- this->proxy_consumer_->push (any);
-}
-
-void
-TAO_NotifyLogNotification::subscription_change
- (const CosNotification::EventTypeSeq & /*added*/,
- const CosNotification::EventTypeSeq & /*removed */
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- CosNotifyComm::InvalidEventType
- ))
-{
- //No-Op.
-}
-
-void
-TAO_NotifyLogNotification::disconnect_push_supplier
- (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- ACE_ASSERT (!CORBA::is_nil (this->proxy_consumer_.in ()));
-
- this->proxy_consumer_->disconnect_push_consumer(ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/orbsvcs/orbsvcs/Log/NotifyLogNotification.h b/TAO/orbsvcs/orbsvcs/Log/NotifyLogNotification.h
deleted file mode 100644
index 00e86066473..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/NotifyLogNotification.h
+++ /dev/null
@@ -1,108 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file NotifyLogNotification.h
- *
- * $Id$
- *
- * Methods to enable log-generated events.
- *
- * @author D A Hanvey <d.hanvey@qub.ac.uk>
- */
-//=============================================================================
-
-#ifndef TAO_TLS_NOTIFY_LOG_NOTIFICATION_H
-#define TAO_TLS_NOTIFY_LOG_NOTIFICATION_H
-
-#include /**/ "ace/pre.h"
-
-#include "orbsvcs/DsNotifyLogAdminS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "orbsvcs/CosEventCommS.h"
-#include "orbsvcs/CosNotifyChannelAdminS.h"
-#include "orbsvcs/CosNotifyCommC.h"
-
-#include "orbsvcs/Log/notifylog_serv_export.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-/**
- * @class TAO_NotifyLogNotification
- *
- * @brief Used to forward log generated events to a logging server.
- */
-class TAO_NotifyLog_Serv_Export TAO_NotifyLogNotification :
- public TAO_LogNotification,
- public POA_CosNotifyComm::PushSupplier
-{
-public:
- // = Initialization and Termination methods.
-
- /// Constructor.
- TAO_NotifyLogNotification (CosNotifyChannelAdmin::EventChannel_ptr);
-
- /// Destructor.
- ~TAO_NotifyLogNotification (void);
-
-protected:
- // = Helper methods
- // = Data members
-
- /// The proxy that we are connected to.
- CosNotifyChannelAdmin::ProxyPushConsumer_var proxy_consumer_;
-
- /// This supplier's id.
- CosNotifyChannelAdmin::ProxyID proxy_consumer_id_;
-
- // = NotifySubscribe
- virtual void subscription_change (
- const CosNotification::EventTypeSeq & added,
- const CosNotification::EventTypeSeq & removed
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- CosNotifyComm::InvalidEventType
- ));
-
- // = StructuredPushSupplier method
- virtual void disconnect_push_supplier (
- ACE_ENV_SINGLE_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- /// Send the event on the event channel.
- virtual void send_notification (const CORBA::Any& any)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
-private:
- /// A reference to the ORB.
- CORBA::ORB_var orb_;
-
- /// A pointer to the EventChannel that events are to be sent to.
- /// This channel is contained in the NotifyLogFactory.
- CosNotifyChannelAdmin::EventChannel_var event_channel_;
-};
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_TLS_NOTIFY_LOG_NOTIFICATION_H */
diff --git a/TAO/orbsvcs/orbsvcs/Log/NotifyLog_i.cpp b/TAO/orbsvcs/orbsvcs/Log/NotifyLog_i.cpp
deleted file mode 100644
index db13c800447..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/NotifyLog_i.cpp
+++ /dev/null
@@ -1,371 +0,0 @@
-#include "orbsvcs/Log/NotifyLog_i.h"
-#include "orbsvcs/Log/LogMgr_i.h"
-#include "orbsvcs/Log/LogNotification.h"
-
-ACE_RCSID (Log,
- NotifyLog_i,
- "$Id$")
-
-#define CA_FILTER "threshold > 10"
-#define TCL_GRAMMAR "TCL"
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-TAO_NotifyLog_i::TAO_NotifyLog_i (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- TAO_LogMgr_i &logmgr_i,
- DsLogAdmin::LogMgr_ptr factory,
- CosNotifyChannelAdmin::EventChannelFactory_ptr ecf,
- TAO_LogNotification *log_notifier,
- DsLogAdmin::LogId id)
- : TAO_Log_i (orb, logmgr_i, factory, id, log_notifier),
- notify_factory_ (CosNotifyChannelAdmin::EventChannelFactory::_duplicate (ecf)),
- poa_ (PortableServer::POA::_duplicate (poa))
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- CosNotifyChannelAdmin::ChannelID channel_id;
-
- CosNotification::QoSProperties initial_qos;
- CosNotification::AdminProperties initial_admin;
-
-
- ACE_ASSERT (!CORBA::is_nil (this->notify_factory_.in ()));
-
- this->event_channel_ =
- this->notify_factory_->create_channel (initial_qos,
- initial_admin,
- channel_id
- ACE_ENV_ARG_PARAMETER);
-}
-
-TAO_NotifyLog_i::~TAO_NotifyLog_i ()
-{
- this->event_channel_->destroy ();
-}
-
-DsLogAdmin::Log_ptr
-TAO_NotifyLog_i::copy (DsLogAdmin::LogId &id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- DsNotifyLogAdmin::NotifyLogFactory_var notifyLogFactory =
- DsNotifyLogAdmin::NotifyLogFactory::_narrow (factory_.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::Log::_nil ());
-
- CosNotification::QoSProperties* qos = get_qos (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::Log::_nil ());
-
- CosNotification::AdminProperties* admin = get_admin (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::Log::_nil ());
-
- DsNotifyLogAdmin::NotifyLog_var log =
- notifyLogFactory->create (DsLogAdmin::halt, 0, thresholds_, static_cast<const CosNotification::QoSProperties> (*qos),
- static_cast<const CosNotification::AdminProperties> (*admin), id);
-
- this->copy_attributes (log.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::Log::_nil ());
-
- return log._retn ();
-}
-
-DsLogAdmin::Log_ptr
-TAO_NotifyLog_i::copy_with_id (DsLogAdmin::LogId id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- DsNotifyLogAdmin::NotifyLogFactory_var notifyLogFactory =
- DsNotifyLogAdmin::NotifyLogFactory::_narrow (factory_.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::Log::_nil ());
-
- CosNotification::QoSProperties* qos = get_qos (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::Log::_nil ());
-
- CosNotification::AdminProperties* admin = get_admin (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::Log::_nil ());
-
- DsNotifyLogAdmin::NotifyLog_var log =
- notifyLogFactory->create_with_id (id, DsLogAdmin::halt, 0, thresholds_, static_cast<const CosNotification::QoSProperties> (*qos),
- static_cast<const CosNotification::AdminProperties> (*admin));
-
- this->copy_attributes (log.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::Log::_nil ());
-
- return log._retn ();
-}
-
-
-void
-TAO_NotifyLog_i::destroy (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- notifier_->object_deletion (logid_ ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Remove ourselves from the list of logs.
- this->logmgr_i_.remove (this->logid_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Deregister with POA.
- PortableServer::ObjectId_var id =
- this->poa_->servant_to_id (this
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->poa_->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-TAO_NotifyLog_i::activate (ACE_ENV_SINGLE_ARG_DECL)
-{
-
- CosNotifyChannelAdmin::AdminID adminid = 0;
- CosNotifyChannelAdmin::InterFilterGroupOperator ifgop =
- CosNotifyChannelAdmin::OR_OP;
-
- this->consumer_admin_ =
- this->event_channel_->new_for_consumers (ifgop, adminid ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_ASSERT (!CORBA::is_nil (consumer_admin_.in ()));
-
- CosNotifyFilter::FilterFactory_var ffact =
- this->event_channel_->default_filter_factory (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // setup a filter at the consumer admin
- CosNotifyFilter::Filter_var ca_filter =
- ffact->create_filter (TCL_GRAMMAR ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_ASSERT (!CORBA::is_nil (ca_filter.in ()));
-
- CosNotifyFilter::ConstraintExpSeq constraint_list (1);
- constraint_list.length (1);
-
- constraint_list[0].event_types.length (0);
- constraint_list[0].constraint_expr = CORBA::string_dup (CA_FILTER);
-
- ca_filter->add_constraints (constraint_list ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- consumer_admin_->add_filter (ca_filter.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Setup the CA to receive all type of events
- CosNotification::EventTypeSeq added(1);
- CosNotification::EventTypeSeq removed (0);
- added.length (1);
- removed.length (0);
-
- added[0].domain_name = CORBA::string_dup ("*");
- added[0].type_name = CORBA::string_dup ("*");
-
- this->consumer_admin_->subscription_change (added, removed ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- ACE_NEW_THROW_EX (this->my_log_consumer_,
- TAO_Notify_LogConsumer (this),
- CORBA::NO_MEMORY ());
-
- this->my_log_consumer_->connect (this->consumer_admin_.in () ACE_ENV_ARG_PARAMETER);
-}
-
-//IDL to C++
-CosNotifyFilter::Filter_ptr
-TAO_NotifyLog_i::get_filter (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- //TODO: need to add impl
- ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
-}
-
-void
-TAO_NotifyLog_i::set_filter (CosNotifyFilter::Filter_ptr /* filter */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- ACE_THROW (CORBA::NO_IMPLEMENT ());
-
- //TODO: need to add impl
-}
-
-CosNotifyChannelAdmin::EventChannelFactory_ptr
-TAO_NotifyLog_i::MyFactory (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- //TODO: need to add impl
- ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
-}
-
-CosNotifyChannelAdmin::ConsumerAdmin_ptr
-TAO_NotifyLog_i::default_consumer_admin (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return this->event_channel_->default_consumer_admin (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-CosNotifyChannelAdmin::SupplierAdmin_ptr
-TAO_NotifyLog_i::default_supplier_admin (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return this->event_channel_->default_supplier_admin (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-CosNotifyFilter::FilterFactory_ptr
-TAO_NotifyLog_i::default_filter_factory (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return this->event_channel_->default_filter_factory (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-CosNotifyChannelAdmin::ConsumerAdmin_ptr
-TAO_NotifyLog_i::new_for_consumers (CosNotifyChannelAdmin::InterFilterGroupOperator op,
- CosNotifyChannelAdmin::AdminID& id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return this->event_channel_->new_for_consumers (op,id ACE_ENV_ARG_PARAMETER);
-}
-
-CosNotifyChannelAdmin::SupplierAdmin_ptr
-TAO_NotifyLog_i::new_for_suppliers (CosNotifyChannelAdmin::InterFilterGroupOperator op,
- CosNotifyChannelAdmin::AdminID& id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return this->event_channel_->new_for_suppliers (op,id ACE_ENV_ARG_PARAMETER);
-}
-
-CosNotifyChannelAdmin::ConsumerAdmin_ptr
-TAO_NotifyLog_i::get_consumeradmin (CosNotifyChannelAdmin::AdminID id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CosNotifyChannelAdmin::AdminNotFound,
- CORBA::SystemException
- ))
-{
- return this->event_channel_->get_consumeradmin (id ACE_ENV_ARG_PARAMETER);
-}
-
-CosNotifyChannelAdmin::SupplierAdmin_ptr
-TAO_NotifyLog_i::get_supplieradmin (CosNotifyChannelAdmin::AdminID id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CosNotifyChannelAdmin::AdminNotFound,
- CORBA::SystemException
- ))
-{
- return this->event_channel_->get_supplieradmin (id ACE_ENV_ARG_PARAMETER);
-}
-
-CosNotifyChannelAdmin::AdminIDSeq*
-TAO_NotifyLog_i::get_all_consumeradmins (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return this->event_channel_->get_all_consumeradmins (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-CosNotifyChannelAdmin::AdminIDSeq*
-TAO_NotifyLog_i::get_all_supplieradmins (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return this->event_channel_->get_all_supplieradmins (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-CosNotification::AdminProperties*
-TAO_NotifyLog_i::get_admin (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return this->event_channel_->get_admin (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-void
-TAO_NotifyLog_i::set_admin (const CosNotification::AdminProperties& admin ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CosNotification::UnsupportedAdmin,
- CORBA::SystemException
- ))
-{
- this->event_channel_->set_admin (admin ACE_ENV_ARG_PARAMETER);
-}
-
-CosNotification::QoSProperties*
-TAO_NotifyLog_i::get_qos (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- //need to add merging of QoS from Log_i and EventChannel_i
- ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
-}
-
-void
-TAO_NotifyLog_i::set_qos (const CosNotification::QoSProperties& /* qos */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CosNotification::UnsupportedQoS,
- CORBA::SystemException
- ))
-{
- ACE_THROW (CORBA::NO_IMPLEMENT ());
- //TODO: need to add later
-}
-
-void
-TAO_NotifyLog_i::validate_qos (
- const CosNotification::QoSProperties& /* required_qos */,
- CosNotification::NamedPropertyRangeSeq_out /* available_qos */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CosNotification::UnsupportedQoS,
- CORBA::SystemException))
-{
- ACE_THROW (CORBA::NO_IMPLEMENT ());
-
- //TODO: need to add later
-}
-
-CosEventChannelAdmin::ConsumerAdmin_ptr
-TAO_NotifyLog_i::for_consumers (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return this->event_channel_->for_consumers(ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-CosEventChannelAdmin::SupplierAdmin_ptr
-TAO_NotifyLog_i::for_suppliers (
- ACE_ENV_SINGLE_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return this->event_channel_->for_suppliers(ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/orbsvcs/orbsvcs/Log/NotifyLog_i.h b/TAO/orbsvcs/orbsvcs/Log/NotifyLog_i.h
deleted file mode 100644
index 81218cf3962..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/NotifyLog_i.h
+++ /dev/null
@@ -1,240 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file NotifyLog_i.h
- *
- * $Id$
- *
- * Implementation of the DsNotifyLogAdmin::NotifyLog interface.
- * File also conatins TAO_Notify_LogConsumer which is used
- * to write events to the Log.
- *
- * @author David A. Hanvey <d.hanvey@qub.ac.uk>
- */
-//=============================================================================
-
-#ifndef TAO_TLS_NOTIFYLOG_I_H
-#define TAO_TLS_NOTIFYLOG_I_H
-
-#include /**/ "ace/pre.h"
-
-#include "orbsvcs/DsLogAdminS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "orbsvcs/DsNotifyLogAdminS.h"
-#include "orbsvcs/Log/Log_i.h"
-#include "orbsvcs/Log/NotifyLogConsumer.h"
-
-#include "orbsvcs/Log/notifylog_serv_export.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-class TAO_LogMgr_i;
-class TAO_NotifyLog_i;
-class TAO_NotifyLogFactory_i;
-
-/**
- * @class TAO_NotifyLog_i
- *
- * @brief The NotifyLog is an EventChannel and a Log.
- *
- * It is used to log events that pass through the EventChannel.
- * The class supports the @c destroy> method to destroy the Log.
- */
-class TAO_NotifyLog_Serv_Export TAO_NotifyLog_i :
- public TAO_Log_i,
- public POA_DsNotifyLogAdmin::NotifyLog
-{
-public:
- // = Initialization and Termination.
-
- /// Constructor.
- TAO_NotifyLog_i (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- TAO_LogMgr_i &logmgr_i,
- DsLogAdmin::LogMgr_ptr factory,
- CosNotifyChannelAdmin::EventChannelFactory_ptr ecf,
- TAO_LogNotification *log_notifier,
- DsLogAdmin::LogId id);
-
- /// Destructor.
- ~TAO_NotifyLog_i ();
-
- /// Duplicate the log.
- virtual DsLogAdmin::Log_ptr copy (DsLogAdmin::LogId &id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- /// Duplicate the log specifying an id.
- virtual DsLogAdmin::Log_ptr copy_with_id (DsLogAdmin::LogId id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- /// Destroy the log object and all contained records.
- void
- destroy (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Activate the NotifyLog.
- void
- activate (ACE_ENV_SINGLE_ARG_DECL);
-
- // = Methods from CosNotifyChannelAdmin::EventChannel.
- CosNotifyFilter::Filter_ptr
- get_filter (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- void set_filter (CosNotifyFilter::Filter_ptr filter ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- CosNotifyChannelAdmin::EventChannelFactory_ptr
- MyFactory (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- CosNotifyChannelAdmin::ConsumerAdmin_ptr
- default_consumer_admin (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- CosNotifyChannelAdmin::SupplierAdmin_ptr
- default_supplier_admin (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- CosNotifyFilter::FilterFactory_ptr
- default_filter_factory (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- CosNotifyChannelAdmin::ConsumerAdmin_ptr
- new_for_consumers (CosNotifyChannelAdmin::InterFilterGroupOperator op,
- CosNotifyChannelAdmin::AdminID& id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- CosNotifyChannelAdmin::SupplierAdmin_ptr
- new_for_suppliers (CosNotifyChannelAdmin::InterFilterGroupOperator op,
- CosNotifyChannelAdmin::AdminID& id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- CosNotifyChannelAdmin::ConsumerAdmin_ptr
- get_consumeradmin (CosNotifyChannelAdmin::AdminID id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CosNotifyChannelAdmin::AdminNotFound,
- CORBA::SystemException
- ));
-
- CosNotifyChannelAdmin::SupplierAdmin_ptr
- get_supplieradmin (CosNotifyChannelAdmin::AdminID id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CosNotifyChannelAdmin::AdminNotFound,
- CORBA::SystemException
- ));
-
- CosNotifyChannelAdmin::AdminIDSeq*
- get_all_consumeradmins (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- CosNotifyChannelAdmin::AdminIDSeq*
- get_all_supplieradmins (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- CosNotification::AdminProperties*
- get_admin (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- void set_admin (const CosNotification::AdminProperties& admin ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CosNotification::UnsupportedAdmin,
- CORBA::SystemException
- ));
-
- CosNotification::QoSProperties*
- get_qos (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- void set_qos (const CosNotification::QoSProperties& ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CosNotification::UnsupportedQoS,
- CORBA::SystemException
- ));
-
- void validate_qos (const CosNotification::QoSProperties&,
- CosNotification::NamedPropertyRangeSeq_out ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CosNotification::UnsupportedQoS,
- CORBA::SystemException
- ));
-
- // = Methods from DsEventLogAdmin::EventLog.
- CosEventChannelAdmin::ConsumerAdmin_ptr
- for_consumers (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
- CosEventChannelAdmin::SupplierAdmin_ptr
- for_suppliers (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
-private:
- /// The PushConsumer that consumes the events and stores them
- /// in the log.
- TAO_Notify_LogConsumer *my_log_consumer_;
-
- /// The Event Channel that the log uses.
- CosNotifyChannelAdmin::EventChannel_var event_channel_;
-
- /// The Event Channel ID that the log uses.
- CosNotifyChannelAdmin::ChannelID channelID_;
-
- /// The EventChannelFactory used to create the EventChannel above.
- CosNotifyChannelAdmin::EventChannelFactory_var notify_factory_;
-
- /// The ConsumerAdmin that the log uses.
- CosNotifyChannelAdmin::ConsumerAdmin_var consumer_admin_;
-
- PortableServer::POA_var poa_;
-};
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_TLS_NOTIFYLOG_I_H */
diff --git a/TAO/orbsvcs/orbsvcs/Log/RTEventLogConsumer.cpp b/TAO/orbsvcs/orbsvcs/Log/RTEventLogConsumer.cpp
deleted file mode 100644
index 08a2cfd036e..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/RTEventLogConsumer.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-#include "orbsvcs/Log/RTEventLog_i.h"
-#include "orbsvcs/Log/LogMgr_i.h"
-#include "orbsvcs/Log/LogNotification.h"
-#include "orbsvcs/Event_Utilities.h"
-#include "orbsvcs/Event/EC_Event_Channel.h"
-#include "orbsvcs/Event/EC_Default_Factory.h"
-#include "orbsvcs/Event/EC_Dispatching.h"
-#include "orbsvcs/Event/EC_ConsumerAdmin.h"
-#include "orbsvcs/Event/EC_SupplierAdmin.h"
-#include "orbsvcs/Event/EC_Timeout_Generator.h"
-#include "orbsvcs/Event/EC_ObserverStrategy.h"
-#include "orbsvcs/Event/EC_ConsumerControl.h"
-#include "orbsvcs/Event/EC_SupplierControl.h"
-#include "ace/Dynamic_Service.h"
-
-ACE_RCSID (Log,
- RTEventLogConsumer,
- "$Id$")
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-TAO_Rtec_LogConsumer::TAO_Rtec_LogConsumer (TAO_RTEventLog_i *log)
- : log_ (log)
-{
-}
-
-TAO_Rtec_LogConsumer::~TAO_Rtec_LogConsumer (void)
-{
-}
-
-void
-TAO_Rtec_LogConsumer::connect (RtecEventChannelAdmin::ConsumerAdmin_ptr consumer_admin)
-{
- RtecEventComm::PushConsumer_var myself = this->_this ();
- this->supplier_proxy_ = consumer_admin->obtain_push_supplier ();
-
- ACE_ConsumerQOS_Factory qos;
- qos.start_disjunction_group (1);
- qos.insert_type (ACE_ES_EVENT_ANY,
- 0);
- this->supplier_proxy_->connect_push_consumer (myself.in(), qos.get_ConsumerQOS ());
-}
-
-void
-TAO_Rtec_LogConsumer::push (const RtecEventComm::EventSet& events ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // create a record list...
- DsLogAdmin::RecordList recList (1);
- recList.length (1);
-
- recList [0].info <<= events;
-
- this->log_->write_recordlist (recList ACE_ENV_ARG_PARAMETER);
-
- ACE_CHECK;
-
-}
-
-void
-TAO_Rtec_LogConsumer::disconnect_push_consumer (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->supplier_proxy_->disconnect_push_supplier (
- ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/orbsvcs/orbsvcs/Log/RTEventLogConsumer.h b/TAO/orbsvcs/orbsvcs/Log/RTEventLogConsumer.h
deleted file mode 100644
index 05fdb9d65f4..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/RTEventLogConsumer.h
+++ /dev/null
@@ -1,95 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file RTEventLogConsumer.h
- *
- * $Id$
- *
- * The RTEventLogConsumer connects to the RTEventLog and logs the events
- * that are pushed to the RTEventLog.
- *
- * @author David A. Hanvey <d.hanvey@qub.ac.uk>
- */
-//=============================================================================
-
-#ifndef TAO_TLS_RTEVENTLOGCONSUMER_H
-#define TAO_TLS_RTEVENTLOGCONSUMER_H
-
-#include /**/ "ace/pre.h"
-
-#include "orbsvcs/DsLogAdminS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "orbsvcs/RTEventLogAdminS.h"
-#include "orbsvcs/Log/Log_i.h"
-#include "orbsvcs/Event/EC_Event_Channel.h"
-#include "orbsvcs/Event/EC_Factory.h"
-#include "orbsvcs/Event/EC_Defaults.h"
-
-#include "orbsvcs/Log/rteventlog_serv_export.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-class TAO_LogMgr_i;
-class TAO_RTEventLog_i;
-class TAO_RTEventLogFactory_i;
-
-/**
- * @class TAO_Rtec_LogConsumer
- *
- * @brief An implementation of the PushConsumer interface.
- *
- * Connects to the RTEventLog and writes LogRecords to the
- * Log when events are 'pushed' to the RTEventLog which is an
- * EventChannel.
- */
-class TAO_RTEventLog_Serv_Export TAO_Rtec_LogConsumer :public virtual POA_RtecEventComm::PushConsumer
-{
-public:
- // = Initialization and Termination methods.
-
- /// Constructor.
- TAO_Rtec_LogConsumer (TAO_RTEventLog_i *log);
-
- /// Destructor.
- ~TAO_Rtec_LogConsumer (void);
-
- /// Connect to RTEventLog.
- void connect (RtecEventChannelAdmin::ConsumerAdmin_ptr consumer_admin);
-
-private:
- /// Disconnect from EventLog.
- void disconnect_push_consumer (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// This method will call TAO_Log_i::log() to write
- /// the event to the Log.
- void push (const RtecEventComm::EventSet& events ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// ProxyPushSupplier used to connect to RTEventLog.
- RtecEventChannelAdmin::ProxyPushSupplier_var supplier_proxy_;
-
- /// The RTEventLog that this consumer connects to
- /// and whose events are to be logged.
- TAO_RTEventLog_i *log_;
-};
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_TLS_RTEVENTLOGCONSUMER_H */
diff --git a/TAO/orbsvcs/orbsvcs/Log/RTEventLogFactory_i.cpp b/TAO/orbsvcs/orbsvcs/Log/RTEventLogFactory_i.cpp
deleted file mode 100644
index bffeb96ecf4..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/RTEventLogFactory_i.cpp
+++ /dev/null
@@ -1,242 +0,0 @@
-#include "orbsvcs/Log/RTEventLogFactory_i.h"
-#include "orbsvcs/Log/LogNotification.h"
-#include "orbsvcs/Log/RTEventLogNotification.h"
-#include "orbsvcs/Event/EC_ConsumerAdmin.h"
-#include "orbsvcs/Event/EC_ProxySupplier.h"
-#include "orbsvcs/Event/EC_ProxyConsumer.h"
-#include "orbsvcs/Event/EC_Event_Channel.h"
-#include "orbsvcs/ESF/ESF_Peer_Workers.h"
-#include "orbsvcs/ESF/ESF_Peer_Admin.h"
-#include "orbsvcs/ESF/ESF_Shutdown_Proxy.h"
-#include "orbsvcs/Event/EC_ConsumerAdmin.h"
-#include "orbsvcs/Event_Utilities.h"
-#include "orbsvcs/Sched/Config_Scheduler.h"
-#include "orbsvcs/Event/EC_Default_Factory.h"
-#include "orbsvcs/Event/EC_Event_Channel.h"
-#include "ace/OS_NS_stdio.h"
-
-#include "ace/Auto_Ptr.h"
-
-ACE_RCSID (Log,
- RTEventLogFactory_i,
- "$Id$")
-
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-TAO_RTEventLogFactory_i::TAO_RTEventLogFactory_i (void)
-{
-}
-
-TAO_RTEventLogFactory_i::~TAO_RTEventLogFactory_i()
-{
-}
-
-int
-TAO_RTEventLogFactory_i::init (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa
- ACE_ENV_ARG_DECL)
-{
- TAO_LogMgr_i::init (orb, poa ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
-
- PortableServer::POA_var defPOA =
- this->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- TAO_EC_Event_Channel_Attributes attr (defPOA.in (), defPOA.in ());
-
- this->impl = 0;
- ACE_NEW_THROW_EX (impl,
- TAO_EC_Event_Channel (attr),
- CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (-1);
-
- auto_ptr <TAO_EC_Event_Channel> ec (impl);
-
- impl->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- PortableServer::ObjectId_var oidec = poa_->activate_object (ec.get ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ec.release ();
-
- CORBA::Object_var objec =
- poa_->id_to_reference (oidec.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- this->event_channel_ = RtecEventChannelAdmin::EventChannel::_narrow (objec.in ());
-
-
- this->consumer_admin_ = this->event_channel_->for_consumers(ACE_ENV_SINGLE_ARG_PARAMETER);
-
- ACE_NEW_THROW_EX (this->notifier_,
- TAO_RTEventLogNotification(this->event_channel_.in ()),
- CORBA::NO_MEMORY ());
- return 0;
-}
-
-RTEventLogAdmin::EventLogFactory_ptr
-TAO_RTEventLogFactory_i::activate (ACE_ENV_SINGLE_ARG_DECL)
-{
- RTEventLogAdmin::EventLogFactory_var v_return;
-
- PortableServer::ObjectId_var oid =
- this->factory_poa_->activate_object (this
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (v_return._retn ());
-
- CORBA::Object_var obj =
- this->factory_poa_->id_to_reference (oid.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (v_return._retn ());
-
- // narrow and store the result..
- this->log_mgr_ =
- DsLogAdmin::LogMgr::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (v_return._retn ());
-
- v_return =
- RTEventLogAdmin::EventLogFactory::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (RTEventLogAdmin::EventLogFactory::_nil ());
-
- return v_return._retn ();
-}
-
-RTEventLogAdmin::EventLog_ptr
-TAO_RTEventLogFactory_i::create (
- DsLogAdmin::LogFullActionType full_action,
- CORBA::ULongLong max_size,
- const DsLogAdmin::CapacityAlarmThresholdList & thresholds,
- DsLogAdmin::LogId_out id_out
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- DsLogAdmin::InvalidLogFullAction,
- DsLogAdmin::InvalidThreshold
- ))
-{
- this->create_i (full_action,
- max_size,
- & thresholds,
- id_out
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (RTEventLogAdmin::EventLog::_nil ());
- DsLogAdmin::LogId id = id_out;
-
-#if (TAO_HAS_MINIMUM_POA == 0)
- DsLogAdmin::Log_var log =
- this->create_log_reference (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (RTEventLogAdmin::EventLog::_nil ());
-#else
- DsLogAdmin::Log_var log =
- this->create_log_object (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (RTEventLogAdmin::EventLog::_nil ());
-#endif
-
- // narrow to EventLog
- RTEventLogAdmin::EventLog_var event_log =
- RTEventLogAdmin::EventLog::_narrow (log.in ());
-
- // @@ JTC - squelch exception?
- notifier_->object_creation (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (RTEventLogAdmin::EventLog::_nil ());
-
- return event_log._retn();
-}
-
-RTEventLogAdmin::EventLog_ptr
-TAO_RTEventLogFactory_i::create_with_id (
- DsLogAdmin::LogId id,
- DsLogAdmin::LogFullActionType full_action,
- CORBA::ULongLong max_size,
- const DsLogAdmin::CapacityAlarmThresholdList & thresholds
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- DsLogAdmin::LogIdAlreadyExists,
- DsLogAdmin::InvalidLogFullAction,
- DsLogAdmin::InvalidThreshold
- ))
-{
- this->create_with_id_i (id,
- full_action,
- max_size,
- & thresholds
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (RTEventLogAdmin::EventLog::_nil ());
-
-#if (TAO_HAS_MINIMUM_POA == 0)
- DsLogAdmin::Log_var log =
- this->create_log_reference (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (RTEventLogAdmin::EventLog::_nil ());
-#else
- DsLogAdmin::Log_var log =
- this->create_log_object (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (RTEventLogAdmin::EventLog::_nil ());
-#endif
-
- // narrow to EventLog
- RTEventLogAdmin::EventLog_var event_log =
- RTEventLogAdmin::EventLog::_narrow (log.in ());
-
- // @@ JTC - squelch exception?
- notifier_->object_creation (id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (RTEventLogAdmin::EventLog::_nil ());
-
- return event_log._retn ();
-}
-
-CORBA::RepositoryId
-TAO_RTEventLogFactory_i::create_repositoryid ()
-{
- return CORBA::string_dup("IDL:omg.org/RTEventLogAdmin:EventLog:1.0");
-}
-
-PortableServer::ServantBase*
-TAO_RTEventLogFactory_i::create_log_servant (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL)
-{
- TAO_RTEventLog_i* event_log_i;
-
- ACE_NEW_THROW_EX (event_log_i,
- TAO_RTEventLog_i (this->orb_.in (),
- this->poa_.in (),
- this->log_poa_.in (),
- *this,
- this->log_mgr_.in (),
- this->notifier_,
- id
- ),
- CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (0);
-
- event_log_i->init (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- //initialise the LogConsumer object
- event_log_i->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- return event_log_i;
-}
-
-RtecEventChannelAdmin::ProxyPushSupplier_ptr
-TAO_RTEventLogFactory_i::obtain_push_supplier (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return consumer_admin_->obtain_push_supplier();
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/orbsvcs/orbsvcs/Log/RTEventLogFactory_i.h b/TAO/orbsvcs/orbsvcs/Log/RTEventLogFactory_i.h
deleted file mode 100644
index d416bd028ec..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/RTEventLogFactory_i.h
+++ /dev/null
@@ -1,141 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file RTEventLogFactory_i.h
- *
- * $Id$
- *
- * Implements the Factory for NotifyLog Objects.
- *
- * @author David A. Hanvey <d.hanvey@qub.ac.uk>
- */
-//=============================================================================
-
-#ifndef TLS_RTEVENTLOGFACTORY_I_H
-#define TLS_RTEVENTLOGFACTORY_I_H
-
-#include /**/ "ace/pre.h"
-
-#include "orbsvcs/RTEventLogAdminS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "orbsvcs/DsLogAdminS.h"
-#include "orbsvcs/Log/LogMgr_i.h"
-#include "orbsvcs/RtecEventChannelAdminS.h"
-#include "orbsvcs/RtecSchedulerS.h"
-
-#include "orbsvcs/Log/RTEventLog_i.h"
-#include "orbsvcs/Log/rteventlog_serv_export.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-class TAO_RTEventLog_i;
-class TAO_RTEventLogNotification;
-
-/**
- * @class TAO_RTEventLogFactory_i
- *
- * @brief The TAO_RTEventLogFactory is a factory that is used to create RTEventLogs which are event-aware.
- */
-class TAO_RTEventLog_Serv_Export TAO_RTEventLogFactory_i :
- public POA_RTEventLogAdmin::EventLogFactory,
- public TAO_LogMgr_i
-{
-public:
- //= Initialization and termination code.
-
- /// Constructor.
- TAO_RTEventLogFactory_i (void);
-
- /// Destructor.
- ~TAO_RTEventLogFactory_i ();
-
- /// Initialise the EventChannel and obtain a
- /// pointer to it.
- int
- init (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa
- ACE_ENV_ARG_DECL);
-
- /// Activate this servant
- RTEventLogAdmin::EventLogFactory_ptr
- activate (ACE_ENV_SINGLE_ARG_DECL);
-
- /// Used to create a RTEventLog.
- RTEventLogAdmin::EventLog_ptr create (
- DsLogAdmin::LogFullActionType full_action,
- CORBA::ULongLong max_size,
- const DsLogAdmin::CapacityAlarmThresholdList & thresholds,
- DsLogAdmin::LogId_out id
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- DsLogAdmin::InvalidLogFullAction,
- DsLogAdmin::InvalidThreshold
- ));
-
- /// Same as create (), but allows clients to specify the id.
- RTEventLogAdmin::EventLog_ptr create_with_id (
- DsLogAdmin::LogId id,
- DsLogAdmin::LogFullActionType full_action,
- CORBA::ULongLong max_size,
- const DsLogAdmin::CapacityAlarmThresholdList & thresholds
- ACE_ENV_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- DsLogAdmin::LogIdAlreadyExists,
- DsLogAdmin::InvalidLogFullAction,
- DsLogAdmin::InvalidThreshold
- ));
-
- // = Implementation of the RtecEventChannelAdmin::ConsumerAdmin methods.
- RtecEventChannelAdmin::ProxyPushSupplier_ptr obtain_push_supplier (
- ACE_ENV_SINGLE_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ));
-
-protected:
- virtual CORBA::RepositoryId
- create_repositoryid ();
-
- virtual PortableServer::ServantBase*
- create_log_servant (DsLogAdmin::LogId id
- ACE_ENV_ARG_DECL);
-
- /// Our object ref. after <active>ation.
- DsLogAdmin::LogMgr_var log_mgr_;
-
- /// The event channel used for log generated events.
- TAO_EC_Event_Channel *impl;
-
- /// The object used for log generated events.
- TAO_RTEventLogNotification* notifier_;
-
- /// EventChannel used to obtain the ConsumerAdmin.
- RtecEventChannelAdmin::EventChannel_var event_channel_;
-
- /// The ConsumerAdmin that the EventLogFactory supports.
- RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin_;
-};
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_TLS_RTEVENTLOGFACTORY_I_H */
diff --git a/TAO/orbsvcs/orbsvcs/Log/RTEventLogNotification.cpp b/TAO/orbsvcs/orbsvcs/Log/RTEventLogNotification.cpp
deleted file mode 100644
index d3ceeb987e8..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/RTEventLogNotification.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-#include "orbsvcs/Log/LogNotification.h"
-#include "orbsvcs/Log/RTEventLogNotification.h"
-#include "orbsvcs/Time_Utilities.h"
-#include "tao/debug.h"
-#include "orbsvcs/Event_Utilities.h"
-#include "orbsvcs/RtecEventChannelAdminC.h"
-#include "orbsvcs/Event_Service_Constants.h"
-#include "orbsvcs/ESF/ESF_Peer_Workers.h"
-#include "orbsvcs/ESF/ESF_Peer_Admin.h"
-#include "orbsvcs/ESF/ESF_Shutdown_Proxy.h"
-#include "orbsvcs/Event/EC_ProxySupplier.h"
-#include "orbsvcs/Event/EC_Dispatching.h"
-#include "orbsvcs/Event/EC_Filter_Builder.h"
-#include "orbsvcs/Event/EC_QOS_Info.h"
-#include "orbsvcs/Event/EC_Event_Channel.h"
-#include "orbsvcs/Event/EC_Scheduling_Strategy.h"
-#include "orbsvcs/Event/EC_ConsumerControl.h"
-#include "orbsvcs/ESF/ESF_RefCount_Guard.h"
-#include "orbsvcs/ESF/ESF_Proxy_RefCount_Guard.h"
-
-ACE_RCSID (Log,
- RTEventLogNotification,
- "$Id$")
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-TAO_RTEventLogNotification::TAO_RTEventLogNotification (
- RtecEventChannelAdmin::EventChannel_ptr ec)
- : TAO_LogNotification (),
- event_channel_ (RtecEventChannelAdmin::EventChannel::_duplicate (ec))
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- obtainProxyConsumer (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-TAO_RTEventLogNotification::~TAO_RTEventLogNotification (void)
-{
- // No-Op.
-}
-
-void
-TAO_RTEventLogNotification::disconnect_push_supplier (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // No-Op.
-}
-
-void
-TAO_RTEventLogNotification::obtainProxyConsumer (ACE_ENV_SINGLE_ARG_DECL)
-{
- RtecEventChannelAdmin::SupplierAdmin_var supplier_admin =
- event_channel_->for_suppliers();
-
- consumer_ = supplier_admin->obtain_push_consumer();
-
- RtecEventComm::PushSupplier_var supplier =
- this->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
-
- // Simple publication, but usually the helper classes in
- // $TAO_ROOT/orbsvcs/Event_Utils.h are a better way to do this.
- RtecEventChannelAdmin::SupplierQOS qos;
- qos.publications.length (1);
- RtecEventComm::EventHeader& h0 =
- qos.publications[0].event.header;
- h0.type = ACE_ES_EVENT_UNDEFINED; // first free event type
- h0.source = 1; // first free event source
-
- consumer_->connect_push_supplier (supplier.in(), qos);
-}
-
-void
-TAO_RTEventLogNotification::send_notification (const CORBA::Any& any)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- RtecEventComm::EventSet event (1);
- event.length (1);
- event[0].header.type = ACE_ES_EVENT_UNDEFINED;
- event[0].header.source = 1;
- event[0].header.ttl = 1;
-#ifndef TAO_LACKS_EVENT_CHANNEL_ANY
- event[0].data.any_value <<= any;
-#else
- ACE_UNUSED_ARG (any);
-#endif
-
- consumer_->push(event);
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/orbsvcs/orbsvcs/Log/RTEventLogNotification.h b/TAO/orbsvcs/orbsvcs/Log/RTEventLogNotification.h
deleted file mode 100644
index 785efe87c79..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/RTEventLogNotification.h
+++ /dev/null
@@ -1,93 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file RTEventLogNotification.h
- *
- * $Id$
- *
- * Methods to enable log-generated events.
- *
- * @author D A Hanvey <d.hanvey@qub.ac.uk>
- */
-//=============================================================================
-
-#ifndef TAO_TLS_RTEVENT_LOG_NOTIFICATION_H
-#define TAO_TLS_RTEVENT_LOG_NOTIFICATION_H
-
-#include /**/ "ace/pre.h"
-
-#include "orbsvcs/Event/EC_ConsumerAdmin.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "orbsvcs/Event/EC_Event_Channel.h"
-#include "orbsvcs/RTEventLogAdminS.h"
-#include "orbsvcs/Event/EC_Default_Factory.h"
-#include "orbsvcs/RtecEventCommS.h"
-#include "orbsvcs/Event/EC_ProxySupplier.h"
-#include "orbsvcs/Event/EC_ProxyConsumer.h"
-
-#include "orbsvcs/Log/rteventlog_serv_export.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-/**
- * @class TAO_RTEventLogNotification
- *
- * @brief Used to forward log generated events to a logging server.
- */
-class TAO_RTEventLog_Serv_Export TAO_RTEventLogNotification :
- public TAO_LogNotification,
- public POA_RtecEventComm::PushSupplier
-{
-public:
- // = Initialization and Termination methods.
-
- /// Constructor.
- TAO_RTEventLogNotification (RtecEventChannelAdmin::EventChannel_ptr);
-
- /// Destructor.
- ~TAO_RTEventLogNotification (void);
-
- /// The skeleton methods.
- virtual void disconnect_push_supplier (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-protected:
- // = Helper methods
-
- /// Used to connect this PushSupplier to the EventChannel
- /// that will log these events.
- void obtainProxyConsumer (ACE_ENV_SINGLE_ARG_DECL);
-
- // Send the event on the event channel.
- virtual void send_notification (const CORBA::Any& any)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// The ORB reference.
- CORBA::ORB_var orb_;
-
- /// The event channel we connect to.
- RtecEventChannelAdmin::EventChannel_var event_channel_;
-
- /// The ProxyPushConsumer used to connect to the event channel.
- RtecEventChannelAdmin::ProxyPushConsumer_var consumer_;
-};
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_TLS_RTEVENT_LOG_NOTIFICATION_H */
diff --git a/TAO/orbsvcs/orbsvcs/Log/RTEventLog_i.cpp b/TAO/orbsvcs/orbsvcs/Log/RTEventLog_i.cpp
deleted file mode 100644
index 3aacac1ff86..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/RTEventLog_i.cpp
+++ /dev/null
@@ -1,166 +0,0 @@
-#include "orbsvcs/Log/RTEventLog_i.h"
-#include "orbsvcs/Log/LogMgr_i.h"
-#include "orbsvcs/Log/LogNotification.h"
-#include "orbsvcs/Event_Utilities.h"
-#include "orbsvcs/Event/EC_Event_Channel.h"
-#include "orbsvcs/Event/EC_Default_Factory.h"
-#include "orbsvcs/Event/EC_Dispatching.h"
-#include "orbsvcs/Event/EC_ConsumerAdmin.h"
-#include "orbsvcs/Event/EC_SupplierAdmin.h"
-#include "orbsvcs/Event/EC_Timeout_Generator.h"
-#include "orbsvcs/Event/EC_ObserverStrategy.h"
-#include "orbsvcs/Event/EC_ConsumerControl.h"
-#include "orbsvcs/Event/EC_SupplierControl.h"
-#include "ace/Dynamic_Service.h"
-
-ACE_RCSID (Log,
- RTEventLog_i,
- "$Id$")
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-TAO_RTEventLog_i::TAO_RTEventLog_i (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- PortableServer::POA_ptr log_poa,
- TAO_LogMgr_i &logmgr_i,
- DsLogAdmin::LogMgr_ptr factory,
- TAO_LogNotification *log_notifier,
- DsLogAdmin::LogId id
- )
- : TAO_Log_i (orb, logmgr_i, factory, id, log_notifier),
- poa_ (PortableServer::POA::_duplicate (poa)),
- log_poa_ (PortableServer::POA::_duplicate (log_poa))
-{
- ACE_DECLARE_NEW_CORBA_ENV;
-
- TAO_EC_Event_Channel_Attributes attr (poa_.in(), poa_.in());
-
- ACE_NEW_THROW_EX (this->event_channel_,
- TAO_EC_Event_Channel(attr),
- CORBA::NO_MEMORY ());
-}
-
-TAO_RTEventLog_i::~TAO_RTEventLog_i ()
-{
- this->event_channel_->destroy ();
-
- delete this->event_channel_;
-}
-
-
-DsLogAdmin::Log_ptr
-TAO_RTEventLog_i::copy (DsLogAdmin::LogId &id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- RTEventLogAdmin::EventLogFactory_var eventLogFactory =
- RTEventLogAdmin::EventLogFactory::_narrow (factory_.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::Log::_nil ());
-
- RTEventLogAdmin::EventLog_var log =
- eventLogFactory->create (DsLogAdmin::halt, 0, thresholds_,
- id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::Log::_nil ());
-
- copy_attributes (log.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::Log::_nil ());
-
- return log._retn ();
-}
-
-DsLogAdmin::Log_ptr
-TAO_RTEventLog_i::copy_with_id (DsLogAdmin::LogId id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((DsLogAdmin::LogIdAlreadyExists, CORBA::SystemException))
-{
- RTEventLogAdmin::EventLogFactory_var eventLogFactory =
- RTEventLogAdmin::EventLogFactory::_narrow (factory_.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::Log::_nil ());
-
- RTEventLogAdmin::EventLog_var log =
- eventLogFactory->create_with_id (id, DsLogAdmin::halt, 0,
- thresholds_ ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::Log::_nil ());
-
- copy_attributes (log.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (DsLogAdmin::Log::_nil ());
-
- return log._retn ();
-}
-
-void
-TAO_RTEventLog_i::destroy (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- notifier_->object_deletion (logid_ ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Remove ourselves from the list of logs.
- this->logmgr_i_.remove (this->logid_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Deregister with POA.
- PortableServer::ObjectId_var id =
- this->log_poa_->servant_to_id (this
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->log_poa_->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-TAO_RTEventLog_i::activate (ACE_ENV_SINGLE_ARG_DECL)
-{
- RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin =
- this->event_channel_->for_consumers (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- this->my_log_consumer_ = new TAO_Rtec_LogConsumer (this);
- this->my_log_consumer_->connect (consumer_admin.in ());
-}
-
-RtecEventChannelAdmin::ConsumerAdmin_ptr
-TAO_RTEventLog_i::for_consumers (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return this->event_channel_->for_consumers(ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-RtecEventChannelAdmin::SupplierAdmin_ptr
-TAO_RTEventLog_i::for_suppliers (
- ACE_ENV_SINGLE_ARG_DECL
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- ))
-{
- return this->event_channel_->for_suppliers(ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-RtecEventChannelAdmin::Observer_Handle
-TAO_RTEventLog_i::append_observer (
- RtecEventChannelAdmin::Observer_ptr observer
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR,
- RtecEventChannelAdmin::EventChannel::CANT_APPEND_OBSERVER))
-{
- return this->observer_strategy_->append_observer (observer
- ACE_ENV_ARG_PARAMETER);
-}
-
-void
-TAO_RTEventLog_i::remove_observer (
- RtecEventChannelAdmin::Observer_Handle handle
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR,
- RtecEventChannelAdmin::EventChannel::CANT_REMOVE_OBSERVER))
-{
- this->observer_strategy_->remove_observer (handle ACE_ENV_ARG_PARAMETER);
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/orbsvcs/orbsvcs/Log/RTEventLog_i.h b/TAO/orbsvcs/orbsvcs/Log/RTEventLog_i.h
deleted file mode 100644
index 6dc0b4975b3..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/RTEventLog_i.h
+++ /dev/null
@@ -1,138 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file RTEventLog_i.h
- *
- * $Id$
- *
- * Implementation of the RTEventLogAdmin::NotifyLog interface.
- *
- *
- * @author David A. Hanvey <d.hanvey@qub.ac.uk>
- */
-//=============================================================================
-
-#ifndef TAO_TLS_RTEVENTLOG_I_H
-#define TAO_TLS_RTEVENTLOG_I_H
-
-#include /**/ "ace/pre.h"
-
-#include "orbsvcs/DsLogAdminS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "orbsvcs/RTEventLogAdminS.h"
-#include "orbsvcs/Log/Log_i.h"
-#include "orbsvcs/Event/EC_Event_Channel.h"
-#include "orbsvcs/Event/EC_Factory.h"
-#include "orbsvcs/Event/EC_Defaults.h"
-#include "orbsvcs/Log/RTEventLogConsumer.h"
-
-#include "orbsvcs/Log/rteventlog_serv_export.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-class TAO_LogMgr_i;
-class TAO_RTEventLog_i;
-class TAO_RTEventLogFactory_i;
-
-/**
- * @class TAO_RTEventLog_i
- *
- * @brief The RTEventLog is an EventChannel and a Log.
- *
- * It is used to log events that pass through the EventChannel.
- * The class supports the @c destroy> method to destroy the Log.
- */
-class TAO_RTEventLog_Serv_Export TAO_RTEventLog_i :
- public TAO_Log_i,
- public POA_RTEventLogAdmin::EventLog
-{
-public:
- // = Initialization and Termination methods.
-
- /// Constructor.
- TAO_RTEventLog_i (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- PortableServer::POA_ptr log_poa,
- TAO_LogMgr_i &logmgr_i,
- DsLogAdmin::LogMgr_ptr factory,
- TAO_LogNotification *log_notifier,
- DsLogAdmin::LogId id);
-
- /// Destructor.
- ~TAO_RTEventLog_i ();
-
- /// Duplicate the log.
- virtual DsLogAdmin::Log_ptr copy (DsLogAdmin::LogId &id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Duplicate the log specifying an id.
- virtual DsLogAdmin::Log_ptr copy_with_id (DsLogAdmin::LogId id ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((DsLogAdmin::LogIdAlreadyExists, CORBA::SystemException));
-
- /// Destroy the log object and all contained records.
- void
- destroy (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Activate the RTEventLog.
- void
- activate (ACE_ENV_SINGLE_ARG_DECL);
-
- // = The RtecEventChannelAdmin::EventChannel interface methods.
- RtecEventChannelAdmin::ConsumerAdmin_ptr
- for_consumers (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- RtecEventChannelAdmin::SupplierAdmin_ptr
- for_suppliers (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual RtecEventChannelAdmin::Observer_Handle
- append_observer (RtecEventChannelAdmin::Observer_ptr
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR,
- RtecEventChannelAdmin::EventChannel::CANT_APPEND_OBSERVER));
- virtual void
- remove_observer (RtecEventChannelAdmin::Observer_Handle
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR,
- RtecEventChannelAdmin::EventChannel::CANT_REMOVE_OBSERVER));
-
- private:
- /// The EventChannel used.
- TAO_EC_Event_Channel *event_channel_;
-
- /// The LogConsumer which logs the events the EventChannel above
- /// receives.
- TAO_Rtec_LogConsumer *my_log_consumer_;
-
- /// The observer strategy
- TAO_EC_ObserverStrategy *observer_strategy_;
-
- PortableServer::POA_var poa_;
-
- PortableServer::POA_var log_poa_;
-};
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#include /**/ "ace/post.h"
-#endif /* TAO_TLS_RTEVENTLOG_I_H */
diff --git a/TAO/orbsvcs/orbsvcs/Log/eventlog_export.h b/TAO/orbsvcs/orbsvcs/Log/eventlog_export.h
deleted file mode 100644
index 2b21d1f4463..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/eventlog_export.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- C++ -*- $Id$ */
-// generate_export_file.pl,v 1.8 2001/03/04 09:16:29 nanbor Exp
-// Definition for Win32 Export directives.
-// This file is generated automatically by generate_export_file.pl
-// ------------------------------
-#ifndef TAO_EVENTLOG_EXPORT_H
-#define TAO_EVENTLOG_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (ACE_AS_STATIC_LIBS) && !defined (TAO_EVENTLOG_HAS_DLL)
-# define TAO_EVENTLOG_HAS_DLL 0
-#endif /* ACE_AS_STATIC_LIBS && TAO_EVENTLOG_HAS_DLL */
-
-#if !defined (TAO_EVENTLOG_HAS_DLL)
-# define TAO_EVENTLOG_HAS_DLL 1
-#endif /* ! TAO_EVENTLOG_HAS_DLL */
-
-#if defined (TAO_EVENTLOG_HAS_DLL) && (TAO_EVENTLOG_HAS_DLL == 1)
-# if defined (TAO_EVENTLOG_BUILD_DLL)
-# define TAO_EventLog_Export ACE_Proper_Export_Flag
-# define TAO_EVENTLOG_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define TAO_EVENTLOG_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* TAO_EVENTLOG_BUILD_DLL */
-# define TAO_EventLog_Export ACE_Proper_Import_Flag
-# define TAO_EVENTLOG_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define TAO_EVENTLOG_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* TAO_EVENTLOG_BUILD_DLL */
-#else /* TAO_EVENTLOG_HAS_DLL == 1 */
-# define TAO_EventLog_Export
-# define TAO_EVENTLOG_SINGLETON_DECLARATION(T)
-# define TAO_EVENTLOG_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* TAO_EVENTLOG_HAS_DLL == 1 */
-
-#endif /* TAO_EVENTLOG_EXPORT_H */
-
-// End of auto generated file.
diff --git a/TAO/orbsvcs/orbsvcs/Log/eventlog_serv_export.h b/TAO/orbsvcs/orbsvcs/Log/eventlog_serv_export.h
deleted file mode 100644
index f3537333c31..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/eventlog_serv_export.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- C++ -*- $Id$ */
-// generate_export_file.pl,v 1.8 2001/03/04 09:16:29 nanbor Exp
-// Definition for Win32 Export directives.
-// This file is generated automatically by generate_export_file.pl
-// ------------------------------
-#ifndef TAO_EVENTLOG_SERV_EXPORT_H
-#define TAO_EVENTLOG_SERV_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (ACE_AS_STATIC_LIBS) && !defined (TAO_EVENTLOG_SERV_HAS_DLL)
-# define TAO_EVENTLOG_SERV_HAS_DLL 0
-#endif /* ACE_AS_STATIC_LIBS && TAO_EVENTLOG_SERV_HAS_DLL */
-
-#if !defined (TAO_EVENTLOG_SERV_HAS_DLL)
-# define TAO_EVENTLOG_SERV_HAS_DLL 1
-#endif /* ! TAO_EVENTLOG_SERV_HAS_DLL */
-
-#if defined (TAO_EVENTLOG_SERV_HAS_DLL) && (TAO_EVENTLOG_SERV_HAS_DLL == 1)
-# if defined (TAO_EVENTLOG_SERV_BUILD_DLL)
-# define TAO_EventLog_Serv_Export ACE_Proper_Export_Flag
-# define TAO_EVENTLOG_SERV_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define TAO_EVENTLOG_SERV_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* TAO_EVENTLOG_SERV_BUILD_DLL */
-# define TAO_EventLog_Serv_Export ACE_Proper_Import_Flag
-# define TAO_EVENTLOG_SERV_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define TAO_EVENTLOG_SERV_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* TAO_EVENTLOG_SERV_BUILD_DLL */
-#else /* TAO_EVENTLOG_SERV_HAS_DLL == 1 */
-# define TAO_EventLog_Serv_Export
-# define TAO_EVENTLOG_SERV_SINGLETON_DECLARATION(T)
-# define TAO_EVENTLOG_SERV_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* TAO_EVENTLOG_SERV_HAS_DLL == 1 */
-
-#endif /* TAO_EVENTLOG_SERV_EXPORT_H */
-
-// End of auto generated file.
diff --git a/TAO/orbsvcs/orbsvcs/Log/eventlog_skel_export.h b/TAO/orbsvcs/orbsvcs/Log/eventlog_skel_export.h
deleted file mode 100644
index f0d5cb23cf2..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/eventlog_skel_export.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- C++ -*- $Id$ */
-// generate_export_file.pl,v 1.8 2001/03/04 09:16:29 nanbor Exp
-// Definition for Win32 Export directives.
-// This file is generated automatically by generate_export_file.pl
-// ------------------------------
-#ifndef TAO_EVENTLOG_SKEL_EXPORT_H
-#define TAO_EVENTLOG_SKEL_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (ACE_AS_STATIC_LIBS) && !defined (TAO_EVENTLOG_SKEL_HAS_DLL)
-# define TAO_EVENTLOG_SKEL_HAS_DLL 0
-#endif /* ACE_AS_STATIC_LIBS && TAO_EVENTLOG_SKEL_HAS_DLL */
-
-#if !defined (TAO_EVENTLOG_SKEL_HAS_DLL)
-# define TAO_EVENTLOG_SKEL_HAS_DLL 1
-#endif /* ! TAO_EVENTLOG_SKEL_HAS_DLL */
-
-#if defined (TAO_EVENTLOG_SKEL_HAS_DLL) && (TAO_EVENTLOG_SKEL_HAS_DLL == 1)
-# if defined (TAO_EVENTLOG_SKEL_BUILD_DLL)
-# define TAO_EventLog_Skel_Export ACE_Proper_Export_Flag
-# define TAO_EVENTLOG_SKEL_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define TAO_EVENTLOG_SKEL_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* TAO_EVENTLOG_SKEL_BUILD_DLL */
-# define TAO_EventLog_Skel_Export ACE_Proper_Import_Flag
-# define TAO_EVENTLOG_SKEL_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define TAO_EVENTLOG_SKEL_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* TAO_EVENTLOG_SKEL_BUILD_DLL */
-#else /* TAO_EVENTLOG_SKEL_HAS_DLL == 1 */
-# define TAO_EventLog_Skel_Export
-# define TAO_EVENTLOG_SKEL_SINGLETON_DECLARATION(T)
-# define TAO_EVENTLOG_SKEL_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* TAO_EVENTLOG_SKEL_HAS_DLL == 1 */
-
-#endif /* TAO_EVENTLOG_SKEL_EXPORT_H */
-
-// End of auto generated file.
diff --git a/TAO/orbsvcs/orbsvcs/Log/log_export.h b/TAO/orbsvcs/orbsvcs/Log/log_export.h
deleted file mode 100644
index 97ea3366e3e..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/log_export.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* -*- C++ -*- $Id$ */
-// log_export.h,v 1.2 2000/10/10 22:16:02 nanbor Exp
-// Definition for Win32 Export directives.
-// This file is generated automatically by generate_export_file.pl
-// ------------------------------
-#ifndef TAO_LOG_EXPORT_H
-#define TAO_LOG_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (TAO_AS_STATIC_LIBS)
-# if !defined (TAO_LOG_HAS_DLL)
-# define TAO_LOG_HAS_DLL 0
-# endif /* ! TAO_LOG_HAS_DLL */
-#else
-# if !defined (TAO_LOG_HAS_DLL)
-# define TAO_LOG_HAS_DLL 1
-# endif /* ! TAO_LOG_HAS_DLL */
-#endif
-
-#if defined (TAO_LOG_HAS_DLL) && (TAO_LOG_HAS_DLL == 1)
-# if defined (TAO_LOG_BUILD_DLL)
-# define TAO_Log_Export ACE_Proper_Export_Flag
-# define TAO_LOG_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define TAO_LOG_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* TAO_LOG_BUILD_DLL */
-# define TAO_Log_Export ACE_Proper_Import_Flag
-# define TAO_LOG_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define TAO_LOG_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* TAO_LOG_BUILD_DLL */
-#else /* TAO_LOG_HAS_DLL == 1 */
-# define TAO_Log_Export
-# define TAO_LOG_SINGLETON_DECLARATION(T)
-# define TAO_LOG_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* TAO_LOG_HAS_DLL == 1 */
-
-#endif /* TAO_LOG_EXPORT_H */
-
-// End of auto generated file.
diff --git a/TAO/orbsvcs/orbsvcs/Log/log_serv_export.h b/TAO/orbsvcs/orbsvcs/Log/log_serv_export.h
deleted file mode 100644
index 000f75e5922..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/log_serv_export.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* -*- C++ -*- $Id$ */
-// log_serv_export.h,v 1.2 2000/10/10 22:16:02 nanbor Exp
-// Definition for Win32 Export directives.
-// This file is generated automatically by generate_export_file.pl
-// ------------------------------
-#ifndef TAO_LOG_SERV_EXPORT_H
-#define TAO_LOG_SERV_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (TAO_AS_STATIC_LIBS)
-# if !defined (TAO_LOG_SERV_HAS_DLL)
-# define TAO_LOG_SERV_HAS_DLL 0
-# endif /* ! TAO_LOG_SERV_HAS_DLL */
-#else
-# if !defined (TAO_LOG_SERV_HAS_DLL)
-# define TAO_LOG_SERV_HAS_DLL 1
-# endif /* ! TAO_LOG_SERV_HAS_DLL */
-#endif
-
-#if defined (TAO_LOG_SERV_HAS_DLL) && (TAO_LOG_SERV_HAS_DLL == 1)
-# if defined (TAO_LOG_SERV_BUILD_DLL)
-# define TAO_Log_Serv_Export ACE_Proper_Export_Flag
-# define TAO_LOG_SERV_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define TAO_LOG_SERV_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* TAO_LOG_SERV_BUILD_DLL */
-# define TAO_Log_Serv_Export ACE_Proper_Import_Flag
-# define TAO_LOG_SERV_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define TAO_LOG_SERV_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* TAO_LOG_SERV_BUILD_DLL */
-#else /* TAO_LOG_SERV_HAS_DLL == 1 */
-# define TAO_Log_Serv_Export
-# define TAO_LOG_SERV_SINGLETON_DECLARATION(T)
-# define TAO_LOG_SERV_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* TAO_LOG_SERV_HAS_DLL == 1 */
-
-#endif /* TAO_LOG_SERV_EXPORT_H */
-
-// End of auto generated file.
diff --git a/TAO/orbsvcs/orbsvcs/Log/log_skel_export.h b/TAO/orbsvcs/orbsvcs/Log/log_skel_export.h
deleted file mode 100644
index db1ff0231fc..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/log_skel_export.h
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-/* -*- C++ -*- $Id$ */
-// log_skel_export.h,v 1.2 2000/10/10 22:16:02 nanbor Exp
-// Definition for Win32 Export directives.
-// This file is generated automatically by generate_export_file.pl
-// ------------------------------
-#ifndef TAO_LOG_SKEL_EXPORT_H
-#define TAO_LOG_SKEL_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (TAO_AS_STATIC_LIBS)
-# if !defined (TAO_LOG_SKEL_HAS_DLL)
-# define TAO_LOG_SKEL_HAS_DLL 0
-# endif /* ! TAO_LOG_SKEL_HAS_DLL */
-#else
-# if !defined (TAO_LOG_SKEL_HAS_DLL)
-# define TAO_LOG_SKEL_HAS_DLL 1
-# endif /* ! TAO_LOG_SKEL_HAS_DLL */
-#endif
-
-#if defined (TAO_LOG_SKEL_HAS_DLL) && (TAO_LOG_SKEL_HAS_DLL == 1)
-# if defined (TAO_LOG_SKEL_BUILD_DLL)
-# define TAO_Log_Skel_Export ACE_Proper_Export_Flag
-# define TAO_LOG_SKEL_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define TAO_LOG_SKEL_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* TAO_LOG_SKEL_BUILD_DLL */
-# define TAO_Log_Skel_Export ACE_Proper_Import_Flag
-# define TAO_LOG_SKEL_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define TAO_LOG_SKEL_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* TAO_LOG_SKEL_BUILD_DLL */
-#else /* TAO_LOG_SKEL_HAS_DLL == 1 */
-# define TAO_Log_Skel_Export
-# define TAO_LOG_SKEL_SINGLETON_DECLARATION(T)
-# define TAO_LOG_SKEL_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* TAO_LOG_SKEL_HAS_DLL == 1 */
-
-#endif /* TAO_LOG_SKEL_EXPORT_H */
-
-// End of auto generated file.
diff --git a/TAO/orbsvcs/orbsvcs/Log/notifylog_export.h b/TAO/orbsvcs/orbsvcs/Log/notifylog_export.h
deleted file mode 100644
index c9f1d99ef4e..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/notifylog_export.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- C++ -*- $Id$ */
-// generate_export_file.pl,v 1.8 2001/03/04 09:16:29 nanbor Exp
-// Definition for Win32 Export directives.
-// This file is generated automatically by generate_export_file.pl
-// ------------------------------
-#ifndef TAO_NOTIFYLOG_EXPORT_H
-#define TAO_NOTIFYLOG_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (ACE_AS_STATIC_LIBS) && !defined (TAO_NOTIFYLOG_HAS_DLL)
-# define TAO_NOTIFYLOG_HAS_DLL 0
-#endif /* ACE_AS_STATIC_LIBS && TAO_NOTIFYLOG_HAS_DLL */
-
-#if !defined (TAO_NOTIFYLOG_HAS_DLL)
-# define TAO_NOTIFYLOG_HAS_DLL 1
-#endif /* ! TAO_NOTIFYLOG_HAS_DLL */
-
-#if defined (TAO_NOTIFYLOG_HAS_DLL) && (TAO_NOTIFYLOG_HAS_DLL == 1)
-# if defined (TAO_NOTIFYLOG_BUILD_DLL)
-# define TAO_NotifyLog_Export ACE_Proper_Export_Flag
-# define TAO_NOTIFYLOG_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define TAO_NOTIFYLOG_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* TAO_NOTIFYLOG_BUILD_DLL */
-# define TAO_NotifyLog_Export ACE_Proper_Import_Flag
-# define TAO_NOTIFYLOG_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define TAO_NOTIFYLOG_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* TAO_NOTIFYLOG_BUILD_DLL */
-#else /* TAO_NOTIFYLOG_HAS_DLL == 1 */
-# define TAO_NotifyLog_Export
-# define TAO_NOTIFYLOG_SINGLETON_DECLARATION(T)
-# define TAO_NOTIFYLOG_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* TAO_NOTIFYLOG_HAS_DLL == 1 */
-
-#endif /* TAO_NOTIFYLOG_EXPORT_H */
-
-// End of auto generated file.
diff --git a/TAO/orbsvcs/orbsvcs/Log/notifylog_serv_export.h b/TAO/orbsvcs/orbsvcs/Log/notifylog_serv_export.h
deleted file mode 100644
index b9a3c655dc8..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/notifylog_serv_export.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- C++ -*- $Id$ */
-// generate_export_file.pl,v 1.8 2001/03/04 09:16:29 nanbor Exp
-// Definition for Win32 Export directives.
-// This file is generated automatically by generate_export_file.pl
-// ------------------------------
-#ifndef TAO_NOTIFYLOG_SERV_EXPORT_H
-#define TAO_NOTIFYLOG_SERV_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (ACE_AS_STATIC_LIBS) && !defined (TAO_NOTIFYLOG_SERV_HAS_DLL)
-# define TAO_NOTIFYLOG_SERV_HAS_DLL 0
-#endif /* ACE_AS_STATIC_LIBS && TAO_NOTIFYLOG_SERV_HAS_DLL */
-
-#if !defined (TAO_NOTIFYLOG_SERV_HAS_DLL)
-# define TAO_NOTIFYLOG_SERV_HAS_DLL 1
-#endif /* ! TAO_NOTIFYLOG_SERV_HAS_DLL */
-
-#if defined (TAO_NOTIFYLOG_SERV_HAS_DLL) && (TAO_NOTIFYLOG_SERV_HAS_DLL == 1)
-# if defined (TAO_NOTIFYLOG_SERV_BUILD_DLL)
-# define TAO_NotifyLog_Serv_Export ACE_Proper_Export_Flag
-# define TAO_NOTIFYLOG_SERV_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define TAO_NOTIFYLOG_SERV_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* TAO_NOTIFYLOG_SERV_BUILD_DLL */
-# define TAO_NotifyLog_Serv_Export ACE_Proper_Import_Flag
-# define TAO_NOTIFYLOG_SERV_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define TAO_NOTIFYLOG_SERV_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* TAO_NOTIFYLOG_SERV_BUILD_DLL */
-#else /* TAO_NOTIFYLOG_SERV_HAS_DLL == 1 */
-# define TAO_NotifyLog_Serv_Export
-# define TAO_NOTIFYLOG_SERV_SINGLETON_DECLARATION(T)
-# define TAO_NOTIFYLOG_SERV_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* TAO_NOTIFYLOG_SERV_HAS_DLL == 1 */
-
-#endif /* TAO_NOTIFYLOG_SERV_EXPORT_H */
-
-// End of auto generated file.
diff --git a/TAO/orbsvcs/orbsvcs/Log/notifylog_skel_export.h b/TAO/orbsvcs/orbsvcs/Log/notifylog_skel_export.h
deleted file mode 100644
index b810fa8bb69..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/notifylog_skel_export.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- C++ -*- $Id$ */
-// generate_export_file.pl,v 1.8 2001/03/04 09:16:29 nanbor Exp
-// Definition for Win32 Export directives.
-// This file is generated automatically by generate_export_file.pl
-// ------------------------------
-#ifndef TAO_NOTIFYLOG_SKEL_EXPORT_H
-#define TAO_NOTIFYLOG_SKEL_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (ACE_AS_STATIC_LIBS) && !defined (TAO_NOTIFYLOG_SKEL_HAS_DLL)
-# define TAO_NOTIFYLOG_SKEL_HAS_DLL 0
-#endif /* ACE_AS_STATIC_LIBS && TAO_NOTIFYLOG_SKEL_HAS_DLL */
-
-#if !defined (TAO_NOTIFYLOG_SKEL_HAS_DLL)
-# define TAO_NOTIFYLOG_SKEL_HAS_DLL 1
-#endif /* ! TAO_NOTIFYLOG_SKEL_HAS_DLL */
-
-#if defined (TAO_NOTIFYLOG_SKEL_HAS_DLL) && (TAO_NOTIFYLOG_SKEL_HAS_DLL == 1)
-# if defined (TAO_NOTIFYLOG_SKEL_BUILD_DLL)
-# define TAO_NotifyLog_Skel_Export ACE_Proper_Export_Flag
-# define TAO_NOTIFYLOG_SKEL_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define TAO_NOTIFYLOG_SKEL_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* TAO_NOTIFYLOG_SKEL_BUILD_DLL */
-# define TAO_NotifyLog_Skel_Export ACE_Proper_Import_Flag
-# define TAO_NOTIFYLOG_SKEL_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define TAO_NOTIFYLOG_SKEL_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* TAO_NOTIFYLOG_SKEL_BUILD_DLL */
-#else /* TAO_NOTIFYLOG_SKEL_HAS_DLL == 1 */
-# define TAO_NotifyLog_Skel_Export
-# define TAO_NOTIFYLOG_SKEL_SINGLETON_DECLARATION(T)
-# define TAO_NOTIFYLOG_SKEL_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* TAO_NOTIFYLOG_SKEL_HAS_DLL == 1 */
-
-#endif /* TAO_NOTIFYLOG_SKEL_EXPORT_H */
-
-// End of auto generated file.
diff --git a/TAO/orbsvcs/orbsvcs/Log/rteventlog_export.h b/TAO/orbsvcs/orbsvcs/Log/rteventlog_export.h
deleted file mode 100644
index 9ad106e8d33..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/rteventlog_export.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- C++ -*- $Id$ */
-// generate_export_file.pl,v 1.8 2001/03/04 09:16:29 nanbor Exp
-// Definition for Win32 Export directives.
-// This file is generated automatically by generate_export_file.pl
-// ------------------------------
-#ifndef TAO_RTEVENTLOG_EXPORT_H
-#define TAO_RTEVENTLOG_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (ACE_AS_STATIC_LIBS) && !defined (TAO_RTEVENTLOG_HAS_DLL)
-# define TAO_RTEVENTLOG_HAS_DLL 0
-#endif /* ACE_AS_STATIC_LIBS && TAO_RTEVENTLOG_HAS_DLL */
-
-#if !defined (TAO_RTEVENTLOG_HAS_DLL)
-# define TAO_RTEVENTLOG_HAS_DLL 1
-#endif /* ! TAO_RTEVENTLOG_HAS_DLL */
-
-#if defined (TAO_RTEVENTLOG_HAS_DLL) && (TAO_RTEVENTLOG_HAS_DLL == 1)
-# if defined (TAO_RTEVENTLOG_BUILD_DLL)
-# define TAO_RTEventLog_Export ACE_Proper_Export_Flag
-# define TAO_RTEVENTLOG_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define TAO_RTEVENTLOG_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* TAO_RTEVENTLOG_BUILD_DLL */
-# define TAO_RTEventLog_Export ACE_Proper_Import_Flag
-# define TAO_RTEVENTLOG_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define TAO_RTEVENTLOG_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* TAO_RTEVENTLOG_BUILD_DLL */
-#else /* TAO_RTEVENTLOG_HAS_DLL == 1 */
-# define TAO_RTEventLog_Export
-# define TAO_RTEVENTLOG_SINGLETON_DECLARATION(T)
-# define TAO_RTEVENTLOG_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* TAO_RTEVENTLOG_HAS_DLL == 1 */
-
-#endif /* TAO_RTEVENTLOG_EXPORT_H */
-
-// End of auto generated file.
diff --git a/TAO/orbsvcs/orbsvcs/Log/rteventlog_serv_export.h b/TAO/orbsvcs/orbsvcs/Log/rteventlog_serv_export.h
deleted file mode 100644
index c3791cd48ae..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/rteventlog_serv_export.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- C++ -*- $Id$ */
-// generate_export_file.pl,v 1.8 2001/03/04 09:16:29 nanbor Exp
-// Definition for Win32 Export directives.
-// This file is generated automatically by generate_export_file.pl
-// ------------------------------
-#ifndef TAO_RTEVENTLOG_SERV_EXPORT_H
-#define TAO_RTEVENTLOG_SERV_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (ACE_AS_STATIC_LIBS) && !defined (TAO_RTEVENTLOG_SERV_HAS_DLL)
-# define TAO_RTEVENTLOG_SERV_HAS_DLL 0
-#endif /* ACE_AS_STATIC_LIBS && TAO_RTEVENTLOG_SERV_HAS_DLL */
-
-#if !defined (TAO_RTEVENTLOG_SERV_HAS_DLL)
-# define TAO_RTEVENTLOG_SERV_HAS_DLL 1
-#endif /* ! TAO_RTEVENTLOG_SERV_HAS_DLL */
-
-#if defined (TAO_RTEVENTLOG_SERV_HAS_DLL) && (TAO_RTEVENTLOG_SERV_HAS_DLL == 1)
-# if defined (TAO_RTEVENTLOG_SERV_BUILD_DLL)
-# define TAO_RTEventLog_Serv_Export ACE_Proper_Export_Flag
-# define TAO_RTEVENTLOG_SERV_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define TAO_RTEVENTLOG_SERV_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* TAO_RTEVENTLOG_SERV_BUILD_DLL */
-# define TAO_RTEventLog_Serv_Export ACE_Proper_Import_Flag
-# define TAO_RTEVENTLOG_SERV_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define TAO_RTEVENTLOG_SERV_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* TAO_RTEVENTLOG_SERV_BUILD_DLL */
-#else /* TAO_RTEVENTLOG_SERV_HAS_DLL == 1 */
-# define TAO_RTEventLog_Serv_Export
-# define TAO_RTEVENTLOG_SERV_SINGLETON_DECLARATION(T)
-# define TAO_RTEVENTLOG_SERV_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* TAO_RTEVENTLOG_SERV_HAS_DLL == 1 */
-
-#endif /* TAO_RTEVENTLOG_SERV_EXPORT_H */
-
-// End of auto generated file.
diff --git a/TAO/orbsvcs/orbsvcs/Log/rteventlog_skel_export.h b/TAO/orbsvcs/orbsvcs/Log/rteventlog_skel_export.h
deleted file mode 100644
index bd0276592f9..00000000000
--- a/TAO/orbsvcs/orbsvcs/Log/rteventlog_skel_export.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- C++ -*- $Id$ */
-// generate_export_file.pl,v 1.8 2001/03/04 09:16:29 nanbor Exp
-// Definition for Win32 Export directives.
-// This file is generated automatically by generate_export_file.pl
-// ------------------------------
-#ifndef TAO_RTEVENTLOG_SKEL_EXPORT_H
-#define TAO_RTEVENTLOG_SKEL_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (ACE_AS_STATIC_LIBS) && !defined (TAO_RTEVENTLOG_SKEL_HAS_DLL)
-# define TAO_RTEVENTLOG_SKEL_HAS_DLL 0
-#endif /* ACE_AS_STATIC_LIBS && TAO_RTEVENTLOG_SKEL_HAS_DLL */
-
-#if !defined (TAO_RTEVENTLOG_SKEL_HAS_DLL)
-# define TAO_RTEVENTLOG_SKEL_HAS_DLL 1
-#endif /* ! TAO_RTEVENTLOG_SKEL_HAS_DLL */
-
-#if defined (TAO_RTEVENTLOG_SKEL_HAS_DLL) && (TAO_RTEVENTLOG_SKEL_HAS_DLL == 1)
-# if defined (TAO_RTEVENTLOG_SKEL_BUILD_DLL)
-# define TAO_RTEventLog_Skel_Export ACE_Proper_Export_Flag
-# define TAO_RTEVENTLOG_SKEL_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define TAO_RTEVENTLOG_SKEL_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* TAO_RTEVENTLOG_SKEL_BUILD_DLL */
-# define TAO_RTEventLog_Skel_Export ACE_Proper_Import_Flag
-# define TAO_RTEVENTLOG_SKEL_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define TAO_RTEVENTLOG_SKEL_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* TAO_RTEVENTLOG_SKEL_BUILD_DLL */
-#else /* TAO_RTEVENTLOG_SKEL_HAS_DLL == 1 */
-# define TAO_RTEventLog_Skel_Export
-# define TAO_RTEVENTLOG_SKEL_SINGLETON_DECLARATION(T)
-# define TAO_RTEVENTLOG_SKEL_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* TAO_RTEVENTLOG_SKEL_HAS_DLL == 1 */
-
-#endif /* TAO_RTEVENTLOG_SKEL_EXPORT_H */
-
-// End of auto generated file.