public class ServiceDescription extends Object
This class is not thread-safe and is meant to be used right before the
creation of Service
objects.
Constructor and Description |
---|
ServiceDescription(String name,
String description)
Creates a new service description with the given name and description,
both of which are mandatory attributes of the service.
|
Modifier and Type | Method and Description |
---|---|
ServiceDescription |
addServiceMethod(ServiceMethodDescription serviceMethodDescription)
Adds the given method to this service description.
|
Service |
createService()
Creates a service with the given description.
|
Map<String,ServiceMethod> |
createServiceMethods()
Creates the service method instances that belongs to this service.
|
ServiceDescription |
executorService(ExecutorService executor)
Determines the executor to be used by the service.
|
public ServiceDescription(String name, String description)
name
- the service name, can't be nulldescription
- the service description; can't be nullpublic ServiceDescription addServiceMethod(ServiceMethodDescription serviceMethodDescription)
serviceMethodDescription
- a service method description, can't be nullpublic ServiceDescription executorService(ExecutorService executor)
The executor is used for wrapping synchronous calls into asynchronous calls.
executor
- an executor service, can't be nullpublic final Map<String,ServiceMethod> createServiceMethods()
public Service createService()
A client may override this to return their service implementation.
Copyright © 2015. All rights reserved.