PutDataMapRequest

  • 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.

public classPutDataMapRequest extendsObject

Public Method Summary

PutDataRequest
asPutDataRequest()
Creates aPutDataRequest containing the data and assets in thisPutDataMapRequest.
staticPutDataMapRequest
create(String path)
Creates aPutDataMapRequest with the provided, complete, path.
staticPutDataMapRequest
createFromDataMapItem(DataMapItem source)
Creates aPutDataMapRequest from aDataMapItem using the provided source.
staticPutDataMapRequest
createWithAutoAppendedId(String pathPrefix)
Creates aPutDataMapRequest with a randomly generated id prefixed with the provided path.
DataMap
getDataMap()
Returns the structured data associated with this data item.
Uri
getUri()
Returns aUri for the pending data item.
boolean
isUrgent()
Whether theDataItem for this request is urgent.
PutDataMapRequest
setUrgent()
Flags thisDataItem for urgent transport.

Inherited Method Summary

From class java.lang.Object
Object
clone()
boolean
equals(Object arg0)
void
finalize()
finalClass<?>
getClass()
int
hashCode()
final void
notify()
final void
notifyAll()
String
toString()
final void
wait(long arg0, int arg1)
final void
wait(long arg0)
final void
wait()

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()

Whether theDataItem for this request is urgent.

Returns
  • true if theDataItem for this request is urgent

publicPutDataMapRequestsetUrgent()

Flags thisDataItem for urgent transport. Clients should only setUrgent() forDataItems which need to be delivered right away.

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.