PutDataMapRequest Stay organized with collections Save and categorize content based on your preferences.
Page Summary
PutDataMapRequest is a DataMap-aware version of PutDataRequest.
It provides static methods to create instances with a specified path, from a DataMapItem, or with an auto-appended ID.
You can convert a PutDataMapRequest to a PutDataRequest, retrieve its associated DataMap, or get its Uri.
It includes methods to check and set whether the DataItem for the request is urgent.
PutDataMapRequest is aDataMap-aware version ofPutDataRequest.
Public Method Summary
| PutDataRequest | asPutDataRequest() Creates a PutDataRequest containing the data and assets in thisPutDataMapRequest. |
| staticPutDataMapRequest | |
| staticPutDataMapRequest | createFromDataMapItem(DataMapItem source) Creates a PutDataMapRequest from aDataMapItem using the provided source. |
| staticPutDataMapRequest | createWithAutoAppendedId(String pathPrefix) Creates a PutDataMapRequest with a randomly generated id prefixed with the provided path. |
| DataMap | getDataMap() Returns the structured data associated with this data item. |
| Uri | |
| boolean | |
| PutDataMapRequest |
Inherited Method Summary
Public Methods
publicPutDataRequestasPutDataRequest()
Creates aPutDataRequest containing the data and assets in thisPutDataMapRequest.
public staticPutDataMapRequestcreate(String path)
Creates aPutDataMapRequest with the provided, complete, path.
public staticPutDataMapRequestcreateFromDataMapItem(DataMapItem source)
Creates aPutDataMapRequest from aDataMapItem using the provided source.
public staticPutDataMapRequestcreateWithAutoAppendedId(String pathPrefix)
Creates aPutDataMapRequest with a randomly generated id prefixed with the provided path.
publicDataMapgetDataMap()
Returns the structured data associated with this data item.
publicUrigetUri()
Returns aUri for the pending data item. If this is a modification of an existing data item,Uri.getHost() will return the id of the node that originally created it. Otherwise, a new data item will be created with the requesting device's node.
public booleanisUrgent()
publicPutDataMapRequestsetUrgent()
Flags thisDataItem for urgent transport. Clients should only setUrgent() forDataItems which need to be delivered right away.
See Also
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.