Ice
3.9
Slice API Reference
Toggle main menu visibility
Loading...
Searching...
No Matches
IceBox
ServiceManager.ice
1
// Copyright (c) ZeroC, Inc.
2
3
#pragma once
4
5
[[
"cpp:dll-export:ICEBOX_API"
]]
6
[[
"cpp:doxygen:include:IceBox/IceBox.h"
]]
7
[[
"cpp:header-ext:h"
]]
8
9
[[
"cpp:include:IceBox/Config.h"
]]
10
11
[[
"js:module:@zeroc/ice"
]]
12
13
#include "Ice/BuiltinSequences.ice"
14
15
/// Host multiple independent services in the same Ice server.
16
[
"java:identifier:com.zeroc.IceBox"
]
17
module
IceBox
18
{
19
/// The exception that is thrown when attempting to start a service that is already running.
20
exception
AlreadyStartedException
21
{
22
}
23
24
/// The exception that is thrown when attempting to stop a service that is already stopped.
25
exception
AlreadyStoppedException
26
{
27
}
28
29
/// The exception that is thrown when a service name does not refer to a known service.
30
exception
NoSuchServiceException
31
{
32
}
33
34
/// Observes the status of services in an IceBox server.
35
/// @remark This interface is implemented by admin tools that monitor the IceBox server.
36
/// @see ServiceManager#addObserver
37
interface
ServiceObserver
38
{
39
/// Receives the names of the services that were started.
40
/// @param services The names of the services that were started.
41
void
servicesStarted
(
Ice::StringSeq
services);
42
43
/// Receives the names of the services that were stopped.
44
/// @param services The names of the services that were stopped.
45
void
servicesStopped
(
Ice::StringSeq
services);
46
}
47
48
/// Administers the services of an IceBox server.
49
interface
ServiceManager
50
{
51
/// Starts a service.
52
/// @param service The service name.
53
/// @throws AlreadyStartedException Thrown when the service is already running.
54
/// @throws NoSuchServiceException Thrown when IceBox does not know a service named @p service.
55
void
startService
(
string
service)
56
throws
AlreadyStartedException
,
NoSuchServiceException
;
57
58
/// Stops a service.
59
/// @param service The service name.
60
/// @throws AlreadyStoppedException Thrown when the service is already stopped.
61
/// @throws NoSuchServiceException Thrown when IceBox does not know a service named @p service.
62
void
stopService
(
string
service)
63
throws
AlreadyStoppedException
,
NoSuchServiceException
;
64
65
/// Returns whether a service is running.
66
/// @param service The name of the service to check.
67
/// @return `true` if the service was started and not stopped; otherwise `false`.
68
/// @throws NoSuchServiceException Thrown when IceBox does not know a service named @p service.
69
bool
isServiceRunning
(
string
service)
70
throws
NoSuchServiceException
;
71
72
/// Registers a new observer with this service manager.
73
/// @param observer The new observer.
74
void
addObserver
(
ServiceObserver
* observer);
75
76
/// Shuts down all services.
77
void
shutdown
();
78
}
79
}
IceBox::AlreadyStartedException
The exception that is thrown when attempting to start a service that is already running.
Definition
ServiceManager.ice:21
IceBox::AlreadyStoppedException
The exception that is thrown when attempting to stop a service that is already stopped.
Definition
ServiceManager.ice:26
IceBox::NoSuchServiceException
The exception that is thrown when a service name does not refer to a known service.
Definition
ServiceManager.ice:31
IceBox::ServiceManager::isServiceRunning
bool isServiceRunning(string service)
Returns whether a service is running.
IceBox::ServiceManager::startService
void startService(string service)
Starts a service.
IceBox::ServiceManager::stopService
void stopService(string service)
Stops a service.
IceBox::ServiceManager::addObserver
void addObserver(ServiceObserver *observer)
Registers a new observer with this service manager.
IceBox::ServiceManager
Administers the services of an IceBox server.
Definition
ServiceManager.ice:50
IceBox::ServiceManager::shutdown
void shutdown()
Shuts down all services.
IceBox::ServiceObserver::servicesStarted
void servicesStarted(Ice::StringSeq services)
Receives the names of the services that were started.
IceBox::ServiceObserver::servicesStopped
void servicesStopped(Ice::StringSeq services)
Receives the names of the services that were stopped.
IceBox::ServiceObserver
Observes the status of services in an IceBox server.
Definition
ServiceManager.ice:38
IceBox
Host multiple independent services in the same Ice server.
Definition
ServiceManager.ice:18
Ice::StringSeq
sequence< string > StringSeq
A sequence of strings.
Definition
BuiltinSequences.ice:46
Generated by
1.17.0