public abstract class RavenFactory extends Object
Raven instances.
The factories register themselves through the ServiceLoader system.
| Constructor and Description |
|---|
RavenFactory() |
| Modifier and Type | Method and Description |
|---|---|
abstract Raven |
createRavenInstance(Dsn dsn)
Creates an instance of Raven given a DSN.
|
static Raven |
ravenInstance()
Creates an instance of Raven using the DSN obtain through
Dsn.dsnLookup(). |
static Raven |
ravenInstance(Dsn dsn)
Creates an instance of Raven using the provided DSN.
|
static Raven |
ravenInstance(Dsn dsn,
String ravenFactoryName)
Creates an instance of Raven using the provided DSN and the specified factory.
|
static Raven |
ravenInstance(String dsn)
Creates an instance of Raven using the provided DSN.
|
static void |
registerFactory(RavenFactory ravenFactory)
Manually adds a RavenFactory to the system.
|
public static void registerFactory(RavenFactory ravenFactory)
Usually RavenFactories are automatically detected with the ServiceLoader system, but some systems
such as Android do not provide a fully working ServiceLoader.
If the factory isn't detected automatically, it's possible to add it through this method.
ravenFactory - ravenFactory to support.public static Raven ravenInstance()
Dsn.dsnLookup().public static Raven ravenInstance(String dsn)
dsn - Data Source Name of the Sentry server.public static Raven ravenInstance(Dsn dsn)
dsn - Data Source Name of the Sentry server.public static Raven ravenInstance(Dsn dsn, String ravenFactoryName)
dsn - Data Source Name of the Sentry server.ravenFactoryName - name of the raven factory to use to generate an instance of Raven.IllegalStateException - when no instance of Raven has been created.public abstract Raven createRavenInstance(Dsn dsn)
dsn - Data Source Name of the Sentry server.RuntimeException - when an instance couldn't be created.Copyright © 2012–2014. All rights reserved.