blob: 334d3ad7dff2506960357998ad572371c700271a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
// **********************************************************************
//
// Copyright (c) 2003
// ZeroC, Inc.
// Billerica, MA, USA
//
// All Rights Reserved.
//
// Ice is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License version 2 as published by
// the Free Software Foundation.
//
// **********************************************************************
#ifndef ICE_INSTANCE_H
#define ICE_INSTANCE_H
#include <IceUtil/Shared.h>
#include <IceUtil/Mutex.h>
#include <IceUtil/RecMutex.h>
#include <Ice/InstanceF.h>
#include <Ice/CommunicatorF.h>
#include <Ice/PropertiesF.h>
#include <Ice/LoggerF.h>
#include <Ice/StatsF.h>
#include <Ice/TraceLevelsF.h>
#include <Ice/DefaultsAndOverridesF.h>
#include <Ice/RouterInfoF.h>
#include <Ice/LocatorInfoF.h>
#include <Ice/ReferenceFactoryF.h>
#include <Ice/ProxyFactoryF.h>
#include <Ice/ThreadPoolF.h>
#include <Ice/ConnectionFactoryF.h>
#include <Ice/ConnectionMonitorF.h>
#include <Ice/ObjectFactoryManagerF.h>
#include <Ice/UserExceptionFactoryManagerF.h>
#include <Ice/ObjectAdapterFactoryF.h>
#include <Ice/EndpointFactoryManagerF.h>
#include <Ice/DynamicLibraryF.h>
#include <Ice/PluginF.h>
#include <list>
namespace Ice
{
class CommunicatorI;
}
namespace IceInternal
{
class Instance : public IceUtil::Shared, public IceUtil::RecMutex
{
public:
Ice::PropertiesPtr properties();
Ice::LoggerPtr logger();
void logger(const Ice::LoggerPtr&);
Ice::StatsPtr stats();
void stats(const Ice::StatsPtr&);
TraceLevelsPtr traceLevels();
DefaultsAndOverridesPtr defaultsAndOverrides();
RouterManagerPtr routerManager();
LocatorManagerPtr locatorManager();
ReferenceFactoryPtr referenceFactory();
ProxyFactoryPtr proxyFactory();
OutgoingConnectionFactoryPtr outgoingConnectionFactory();
ConnectionMonitorPtr connectionMonitor();
ObjectFactoryManagerPtr servantFactoryManager();
UserExceptionFactoryManagerPtr userExceptionFactoryManager();
ObjectAdapterFactoryPtr objectAdapterFactory();
ThreadPoolPtr clientThreadPool();
ThreadPoolPtr serverThreadPool();
EndpointFactoryManagerPtr endpointFactoryManager();
DynamicLibraryListPtr dynamicLibraryList();
Ice::PluginManagerPtr pluginManager();
private:
Instance(const Ice::CommunicatorPtr&, int&, char*[], const Ice::PropertiesPtr&);
virtual ~Instance();
void finishSetup(int&, char*[]);
void destroy();
friend class Ice::CommunicatorI;
bool _destroyed;
Ice::PropertiesPtr _properties; // Immutable, not reset by destroy().
Ice::LoggerPtr _logger; // Not reset by destroy().
Ice::StatsPtr _stats; // Not reset by destroy().
TraceLevelsPtr _traceLevels; // Immutable, not reset by destroy().
DefaultsAndOverridesPtr _defaultsAndOverrides; // Immutable, not reset by destroy().
RouterManagerPtr _routerManager;
LocatorManagerPtr _locatorManager;
ReferenceFactoryPtr _referenceFactory;
ProxyFactoryPtr _proxyFactory;
OutgoingConnectionFactoryPtr _outgoingConnectionFactory;
ConnectionMonitorPtr _connectionMonitor;
ObjectFactoryManagerPtr _servantFactoryManager;
UserExceptionFactoryManagerPtr _userExceptionFactoryManager;
ObjectAdapterFactoryPtr _objectAdapterFactory;
ThreadPoolPtr _clientThreadPool;
ThreadPoolPtr _serverThreadPool;
EndpointFactoryManagerPtr _endpointFactoryManager;
DynamicLibraryListPtr _dynamicLibraryList;
Ice::PluginManagerPtr _pluginManager;
//
// Global state management
//
friend class GlobalStateMutexDestroyer;
static int _globalStateCounter;
static IceUtil::Mutex* _globalStateMutex;
#ifndef _WIN32
static std::string _identForOpenlog;
#endif
};
}
#endif
|