summaryrefslogtreecommitdiff
path: root/cpp/slice/IceBox/IceBox.ice
blob: aef5ee6013498a28bd015c81fd50f0460f115a83 (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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
// **********************************************************************
//
// 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_BOX_ICE_BOX_ICE
#define ICE_BOX_ICE_BOX_ICE

#include <Ice/BuiltinSequences.ice>
#include <Ice/CommunicatorF.ice>
#include <Ice/PropertiesF.ice>

/**
 *
 * &IceBox; is an application server specifically for &Ice;
 * applications. &IceBox; can easily run and administer Ice services
 * that are dynamically loaded as a DLL, shared library, or Java
 * class.
 *
 **/
module IceBox
{
    
/**
 *
 * Indicates a failure occurred. For example, if a service encounters
 * an error during initialization, or if the service manager is unable
 * to load a service executable.
 *
 **/
local exception FailureException
{
    /**
     *
     * The reason for the failure.
     *
     **/
    string reason;
};

/**
 *
 * Base interface for an application service managed by a [ServiceManager].
 *
 * @see ServiceManager
 * @see Service
 * @see FreezeService
 *
 **/
local interface ServiceBase
{
    /**
     *
     * Stop the service.
     *
     **/
    void stop();
};

/**
 *
 * A standard application service managed by a [ServiceManager].
 *
 * @see ServiceBase
 *
 **/
local interface Service extends ServiceBase
{
    /**
     *
     * Start the service. The given communicator is created by the
     * [ServiceManager] for use by the service. This communicator may
     * also be used by other services, depending on the service
     * configuration.
     *
     * <note><para>The [ServiceManager] owns this communicator, and is
     * responsible for destroying it.</para></note>
     *
     * @param name The service's name, as determined by the
     * configuration.
     *
     * @param communicator A communicator for use by the service.
     *
     * @param args The service arguments that were not converted into
     * properties.
     *
     * @throws FailureException Raised if [start] failed.
     *
     **/
    void start(string name, Ice::Communicator communicator, Ice::StringSeq args);
};

/**
 * 
 * A Freeze application service managed by a [ServiceManager].
 *
 * @see ServiceBase
 * 
 */
local interface FreezeService extends ServiceBase
{
    /**
     *
     * Start the service. The given communiator is created by the
     * [ServiceManager] for use by the service. This communicator may
     * also be used by other services, depending on the service
     * configuration. The database environment is created by the
     * [ServiceManager] for the exclusive use of the service.
     *
     * <note><para>The [ServiceManager] owns the communiator and the
     * database environment, and is responsible for destroying
     * them.</para></note>
     *
     * @param name The service's name, as determined by the
     * configuration.
     *
     * @param communicator A communiator for use by the service.
     *
     * @param args The service arguments that were not converted into
     * properties.
     *
     * @param envName The name of the Freeze database environment.
     *
     * @throws FailureException Raised if [start] failed.
     *
     **/
    void start(string name, Ice::Communicator communicator, Ice::StringSeq args, string envName);
};

/**
 *
 * Administers a set of [Service] instances.
 *
 * @see Service
 *
 **/
interface ServiceManager
{
    /**
     *
     * Shutdown all services. This will cause [Service::stop] to be
     * invoked on all configured services.
     *
     **/
    void shutdown();
};

};

#endif