- All Superinterfaces:
Object
Administers the services of an IceBox server.
Remarks:
The Slice compiler generated this skeleton interface from Slice interface ::IceBox::ServiceManager.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.zeroc.Ice.Object
Object.Ice_invokeResult -
Method Summary
Modifier and TypeMethodDescriptionaddObserverAsync(ServiceObserverPrx observer, Current current) Registers a new observer with this service manager.default CompletionStage<OutgoingResponse>dispatch(IncomingRequest request) Dispatches an incoming request to one of the methods of this generated interface, based on the operation name carried by the request.static StringGets the type ID of the associated Slice interface.isServiceRunningAsync(String service, Current current) Returns whether a service is running.shutdownAsync(Current current) Shuts down all services.startServiceAsync(String service, Current current) Starts a service.stopServiceAsync(String service, Current current) Stops a service.
-
Method Details
-
startServiceAsync
CompletionStage<Void> startServiceAsync(String service, Current current) throws AlreadyStartedException, NoSuchServiceException Starts a service.- Parameters:
service- The service name.current- the Current object of the incoming request- Returns:
- a completion stage that the servant will complete when the invocation completes
- Throws:
AlreadyStartedException- Thrown when the service is already running.NoSuchServiceException- Thrown when IceBox does not know a service namedservice.
-
stopServiceAsync
CompletionStage<Void> stopServiceAsync(String service, Current current) throws AlreadyStoppedException, NoSuchServiceException Stops a service.- Parameters:
service- The service name.current- the Current object of the incoming request- Returns:
- a completion stage that the servant will complete when the invocation completes
- Throws:
AlreadyStoppedException- Thrown when the service is already stopped.NoSuchServiceException- Thrown when IceBox does not know a service namedservice.
-
isServiceRunningAsync
CompletionStage<Boolean> isServiceRunningAsync(String service, Current current) throws NoSuchServiceException Returns whether a service is running.- Parameters:
service- The name of the service to check.current- the Current object of the incoming request- Returns:
trueif the service was started and not stopped; otherwisefalse.- Throws:
NoSuchServiceException- Thrown when IceBox does not know a service namedservice.
-
addObserverAsync
Registers a new observer with this service manager.- Parameters:
observer- The new observer.current- the Current object of the incoming request- Returns:
- a completion stage that the servant will complete when the invocation completes
-
shutdownAsync
Shuts down all services.- Parameters:
current- the Current object of the incoming request- Returns:
- a completion stage that the servant will complete when the invocation completes
-
ice_staticId
Gets the type ID of the associated Slice interface.- Returns:
- the string "::IceBox::ServiceManager"
-
dispatch
Dispatches an incoming request to one of the methods of this generated interface, based on the operation name carried by the request.- Specified by:
dispatchin interfaceObject- Parameters:
request- the incoming request- Returns:
- the outgoing response
- Throws:
UserException- if aUserExceptionis thrown, Ice will marshal it as the response payload.
-