RemoteDatabaseClient

public final class RemoteDatabaseClient implements FirebaseClient

A FirebaseClient which operates via the Firebase REST API and the Java Admin SDK.

The client uses the Java Firebase Admin SDK for subscribing to events of a given database node. The API exposes the ChildEventListener so that the caller may build more complex "nested" subscriptions without a need to re-fetch database references.

For all the other operations, the client uses the Firebase REST API as described in the documentation.

Types

Link copied to clipboard
public final class Builder
A builder for the RemoteDatabaseClient instances.

Functions

Link copied to clipboard
public void create(NodePath nodePath, NodeValue value)
Writes the specified value to the Firebase database node.
Link copied to clipboard
public void delete(NodePath nodePath)
Deletes the node under the given path.
Link copied to clipboard
public Optional<NodeValue> fetchNode(NodePath nodePath)
Retrieves the value of the specified Firebase database node.
Link copied to clipboard
Creates a new instance of Builder for RemoteDatabaseClient instances.
Link copied to clipboard
public void subscribeTo(NodePath nodePath, ChildEventListener listener)
Subscribes to the child events of the given node.
Link copied to clipboard
public void update(NodePath nodePath, NodeValue value)
Merges the specified value to the Firebase database node.