Usage: [DreamFeature(PATH, SIGNATURE, VERB, DESCRIPTION, INFO]
Usage: [DreamFeature(PATTERN, DESCRIPTION)]
This attribute is applied to feature methods (protection level does not matter). It provides meta-information about the feature, such as its relative path, a pattern signature, a HTTP verb, a description, and a URI pointing to additional documentation. The verb, path, and signature elements can also be provided in a compact
| Parameter | Type | Description |
| PATH | string | A valid relative URI path. Maybe be empty to denote service root. |
| SIGNATURE | string | Pattern for matching suffixes. |
| VERB | string | Any HTTP verb such as GET, PUT, POST, DELETE, etc. or * as a wild-card for any HTTP verb. |
| DESCRIPTION | string | A human readable short description of the feature. |
| INFO | string (URI) | A URI string pointing to online documentation of the feature. |
| PATTERN |
string |
The combined VERB, PATH, and SIGNATURE elements. |
The verb can be any non-empty string. It is also allowed to use "*" as the verb for a feature. In this case, the feature is invoked regardless of the verb used by the requestor.
The signature uses a simple syntax to describe the pattern of valid suffixes. The following table provides examples of suffixes and their meaning.
| Signature | Meaning |
| / | no suffixes |
| /? | zero or one suffix |
| /* | one suffix |
| /*/? | one or two suffixes |
| /*/?/? | one, two, or three suffixes |
| /*/*/* | three suffixes |
| //* | zero or more suffixes |
| /*/*//* | two or more suffixes |
| /*/*/?//* | two or more suffixes (same as /*/*//*) |
Let's illustrate the above with an example. Assume we have a service feature defined as GET:item/* and that we instantiated our service at http://localhost/service. Then, the following would be true:
Features can be overloaded, thus GET:item/ and GET:item/* are two distinct features. However, if we were to add GET:item/? as a new feature, we would introduce non-determinism as to which feature gets invoked.
Usage: [DreamFeatureParam(NAME, TYPE, DESCRIPTION)]
This attribute is applied to feature methods. It provides meta-information about a feature parameter that may be specified when invoking the feature.
| Parameter | Type | Description |
| NAME | string | The name of the feature parameter. |
| TYPE | string | The feature parameter type (usually int or string). Can be followed by a question mark (?) to denote that the parameter is optional. |
| DESCRIPTION | string | A human readable short description of the feature parameter. |
Feature parameters are specified as query parameters in the uri. For example, count is a feature parameter in http://localhost:8081/service/item/book?count=10.
Usage: [DreamService(NAME, COPYRIGHT, INFO)]
Usage: [DreamService(NAME, COPYRIGHT)]
This attribute is applied to a service class definition. It provides meta-information about the service, such as its human readable name, a copyright notice, and a URI pointing to additional documentation. This information is embedded into the blueprint when it is generated.
| Parameter | Type | Description |
| NAME | string | The human readable name of the service. |
| COPYRIGHT | string | The copyright notice for the service. |
| INFO | string (URI) | A URI string pointing to online documentation of the service. |
Usage: [DreamServiceConfig(NAME, TYPE, DESCRIPTION)]
This attribute is applied to a service class definition. It provides configuration information about the service. This information is embedded into the blueprint when it is generated.
| Parameter | Type | Description |
| NAME | string | The name of the config parameter. |
| TYPE | string | The config parameter type. Can be followed by a question mark (?) to denote that the parameter is optional. |
| DESCRIPTION | string | A human readable short description of the config parameter. |
Usage: [DreamState]
This attribute can be applied to an instance fields of a service class definition or to the service class definition itself.