FirebaseOptions

public final classFirebaseOptions extends Object

Configurable Firebase options.

Nested Class Summary

classFirebaseOptions.BuilderBuilder for constructingFirebaseOptions

Public Method Summary

staticFirebaseOptions.Builder
builder()
Creates an empty builder.
int
getConnectTimeout()
Returns the connect timeout in milliseconds, which is applied to outgoing REST calls made by the SDK.
Map<String, Object>
getDatabaseAuthVariableOverride()
Returns theauth variable to be used in Security Rules.
String
getDatabaseUrl()
Returns the Realtime Database URL to use for data storage.
HttpTransport
getHttpTransport()
Returns theHttpTransport used to call remote HTTP endpoints.
JsonFactory
getJsonFactory()
Returns theJsonFactory used to parse JSON when calling remote HTTP endpoints.
String
getProjectId()
Returns the Google Cloud project ID.
int
getReadTimeout()
Returns the read timeout applied to outgoing REST calls in milliseconds.
String
getServiceAccountId()
Returns the client email address of the service account.
String
getStorageBucket()
Returns the name of the Google Cloud Storage bucket used for storing application data.
int
getWriteTimeout()
Returns the write timeout applied to outgoing REST calls in milliseconds.
FirebaseOptions.Builder
toBuilder()
Creates a newBuilder from the options object.

Inherited Method Summary

From class java.lang.Object
Object
clone()
boolean
equals(Object arg0)
void
finalize()
final Class<?>
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

public staticFirebaseOptions.Builderbuilder()

Creates an empty builder.

Returns
  • A new builder instance.

public intgetConnectTimeout()

Returns the connect timeout in milliseconds, which is applied to outgoing REST calls made by the SDK.

Returns
  • Connect timeout in milliseconds. 0 indicates an infinite timeout.

public Map<String, Object>getDatabaseAuthVariableOverride()

Returns theauth variable to be used in Security Rules.

Returns

public StringgetDatabaseUrl()

Returns the Realtime Database URL to use for data storage.

Returns

public HttpTransportgetHttpTransport()

Returns theHttpTransport used to call remote HTTP endpoints. This transport is used by all services of the SDK, except for FirebaseDatabase.

Returns
  • A Google API clientHttpTransport instance.

public JsonFactorygetJsonFactory()

Returns theJsonFactory used to parse JSON when calling remote HTTP endpoints.

Returns
  • A Google API clientJsonFactory instance.

public StringgetProjectId()

Returns the Google Cloud project ID.

Returns

public intgetReadTimeout()

Returns the read timeout applied to outgoing REST calls in milliseconds.

Returns
  • Read timeout in milliseconds. 0 indicates an infinite timeout.

public StringgetServiceAccountId()

Returns the client email address of the service account.

Returns

public StringgetStorageBucket()

Returns the name of the Google Cloud Storage bucket used for storing application data.

Returns

public intgetWriteTimeout()

Returns the write timeout applied to outgoing REST calls in milliseconds.

Returns
  • Write timeout in milliseconds. 0 indicates an infinite timeout.

publicFirebaseOptions.BuildertoBuilder()

Creates a newBuilder from the options object.

The new builder is not backed by this object's values; that is, changes made to the new builder don't change the values of the origin object.

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-05-21 UTC.