blob: bb3a31ded21788a70c298fbbbd4bedffabe7e07a (
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
|
// **********************************************************************
//
// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
#ifndef ICE_PLUGIN_ICE
#define ICE_PLUGIN_ICE
module Ice
{
/**
*
* A communicator plugin. A plugin generally adds a feature to a
* communicator, such as support for a protocol.
*
* The communicator loads its plugins in two stages: the first stage
* creates the plugins, and the second stage invokes [initialize] on
* each one.
*
**/
local interface Plugin
{
/**
*
* Perform any necessary initialization steps.
*
**/
void initialize();
/**
*
* Called when the communicator is being destroyed.
*
**/
void destroy();
};
/**
*
* Each communicator has a plugin manager to administer the set of
* plugins.
*
**/
local interface PluginManager
{
/**
*
* Initialize the configured plugins. The communicator automatically initializes
* the plugins by default, but an application may need to interact directly with
* a plugin prior to initialization. In this case, the application must set
* <tt>Ice.InitPlugins=0</tt> and then invoke [initializePlugins]
* manually. The plugins are initialized in the order in which they are loaded.
* If a plugin raises an exception during initialization, the communicator
* invokes destroy on the plugins that have already been initialized.
*
* @throws InitializationException Raised if the plugins have already been initialized.
*
**/
void initializePlugins();
/**
*
* Obtain a plugin by name.
*
* @param name The plugin's name.
*
* @return The plugin.
*
* @throws NotRegisteredException Raised if no plugin is found with the given name.
*
**/
Plugin getPlugin(string name);
/**
*
* Install a new plugin.
*
* @param name The plugin's name.
*
* @param pi The plugin.
*
* @throws AlreadyRegisteredException Raised if a plugin already exists with the given name.
*
**/
void addPlugin(string name, Plugin pi);
/**
*
* Called when the communicator is being destroyed.
*
**/
void destroy();
};
};
#endif
|