Skip navigation links

Package org.diirt.service

Support for services (request/response operations).

See: Description

Package org.diirt.service Description

Support for services (request/response operations).

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.

Skip navigation links

Copyright © 2015. All rights reserved.