@ProviderType public interface ServiceLayer
It contains low level API and high level API. The only low level method is request() and other methods are categorized as high level API.
Modifier and Type | Method and Description |
---|---|
Promise<ResourceDTO> |
create(String uri,
ResourceDTO resource)
create resource
|
Promise<Boolean> |
delete(String uri)
delete resource
|
Promise<List<String>> |
discovery(String uri,
FilterCriteriaDTO fc)
find resources with filter condition specified in fc argument.
|
Promise<List<String>> |
discovery(String uri,
FilterCriteriaDTO fc,
RequestPrimitiveDTO.DesiredIdentifierResultType drt)
find resources with filter condition specified in fc argument.
|
Promise<Boolean> |
notify(String uri,
NotificationDTO notification)
send notification
|
Promise<ResponsePrimitiveDTO> |
request(RequestPrimitiveDTO request)
send a request and receive response.
|
Promise<ResourceDTO> |
retrieve(String uri)
retrieve resource
|
Promise<ResourceDTO> |
retrieve(String uri,
List<String> targetAttributes)
retrieve resource with selected attributes.
|
Promise<ResourceDTO> |
update(String uri,
ResourceDTO resource)
update resource
|
Promise<ResponsePrimitiveDTO> request(RequestPrimitiveDTO request)
This method allows very raw data type access and it enables all possible message exchanges among oneM2M entities. This is called the low level API. This method allows all possible operation of oneM2M. For the return type, OSGi Promise is used for allowing synchronous and asynchronous calling manner.
request
- request primitivePromise<ResourceDTO> create(String uri, ResourceDTO resource)
The create() method is a method to create new resource under specified uri. The second argument resource is expression of resource to be generated. The resourceType field of the resourceDTO must be assigned. For other fields depends on resource type. Section 7.4 of TS-00004 specifies the optionalities of the fields.
uri
- URI for parent resource of the resource being created.resource
- resource dataPromise<ResourceDTO> retrieve(String uri)
retrieve resource on URI specified by uri argument. This method retrieve all attributes of the resource.
uri
- URI for retrieving resourcePromise<ResourceDTO> retrieve(String uri, List<String> targetAttributes)
retrieve resource on URI specified by uri argument. This method retrieve selected attributes by targetAttributes argument. The retrieve() methods are methods to retrieve resource on URI specified by uri argument.
uri
- URI for retrieving resourcetargetAttributes
- names of the target attributePromise<ResourceDTO> update(String uri, ResourceDTO resource)
The update() method is a method to update resource on the URI specified by uri argument. The resource argument holds attributes to be updated. Attributes not to be updated shall not included in the argument.
uri
- URI for updating resourceresource
- data resourcePromise<Boolean> delete(String uri)
delete resource on the URI specified by uri argument.
uri
- target URI for deleting resourcePromise<List<String>> discovery(String uri, FilterCriteriaDTO fc)
Discovery Result Type is kept as blank and default value of target CSE is used for the parameter.
uri
- URI for resource tree to start the searchfc
- filter criteria selecting resourcesPromise<List<String>> discovery(String uri, FilterCriteriaDTO fc, RequestPrimitiveDTO.DesiredIdentifierResultType drt)
With this method application can specify desired identifier in result
uri
- URI for resource tree to start the searchfc
- filter criteriadrt
- Discovery Result Type (structured/unstructured)Promise<Boolean> notify(String uri, NotificationDTO notification)
uri
- uri of destinationnotification
- content of notificationCopyright © Contributors to the Eclipse Foundation Licensed under the Eclipse Foundation Specification License – v1.0