| Interface | Description |
|---|---|
| ServiceProvider |
Provides a set of services that can be registered to the framework.
|
| Class | Description |
|---|---|
| AbstractFileServiceProvider |
A service provider that can create a service instance for each file in
the configuration directory.
|
| Service |
Group of request/response operations that share the same resources.
|
| ServiceDescription |
A utility class to gather all the elements that define the service.
|
| ServiceMethod |
A request/response operation.
|
| ServiceMethod.DataDescription |
The full description of an argument of a result of the service.
|
| ServiceMethodDescription |
A utility class to gather all the elements that define the service method.
|
| ServiceRegistry |
Main entry point for service lookup.
|
There are three main objects a generic client will use. The ServiceRegistry
is used to locate the services and methods. The Service groups together
a set of methods that use the same resources (i.e. thread pool, database
connections, ...). The ServiceMethod represents a single request/response
call, which can be executed both synchronously (ServiceMethod.executeSync(java.util.Map))
or asynchronously (ServiceMethod.executeAsync(java.util.Map, java.util.function.Consumer, java.util.function.Consumer)).
All objects are self-describing (i.e. have a name and description) and are
thread-safe.
When implementing a service, ServiceMethodDescription and
ServiceDescription are used to gather the information, so that
the final objects remain immutable and thread-safe. The actual implementation
of the call is provided by a subclass of ServiceMethod. The
ServiceProvider is used to register the service implementation
using the ServiceLoader mechanism.
Copyright © 2015. All rights reserved.