public abstract class ServiceMethodDescription extends Object
This class is not thread-safe and is meant to be used right before
the creation of ServiceMethod
objects.
Constructor and Description |
---|
ServiceMethodDescription(String name,
String description)
Creates a new service method description with the given name and description,
both of which are mandatory attributes of the service methods.
|
Modifier and Type | Method and Description |
---|---|
ServiceMethodDescription |
addArgument(String name,
String description,
Class<?> type)
Adds an argument for this method, with the given name, description and type.
|
ServiceMethodDescription |
addResult(String name,
String description,
Class<?> type)
Adds a result for this method, with the given name, description and type.
|
abstract ServiceMethod |
createServiceMethod(ServiceDescription serviceDescription)
Creates a service method with the given description.
|
public ServiceMethodDescription(String name, String description)
name
- the service method name, can't be null or emptydescription
- the service method description, can't be null or emptypublic ServiceMethodDescription addArgument(String name, String description, Class<?> type)
name
- a short argument name; can't be null or emptydescription
- a meaningful description; can't be null or emptytype
- the type of the argumentpublic ServiceMethodDescription addResult(String name, String description, Class<?> type)
name
- a short result name; can't be nulldescription
- a meaningful description; can't be nulltype
- the type of the resultpublic abstract ServiceMethod createServiceMethod(ServiceDescription serviceDescription)
A client should implement this to return their service method implementation.
serviceDescription
- service description for the new service methodCopyright © 2015. All rights reserved.