public class DefaultRavenFactory extends RavenFactory
RavenFactory.
In most cases this is the implementation to use or extend for additional features.
| Modifier and Type | Class and Description |
|---|---|
protected static class |
DefaultRavenFactory.DaemonThreadFactory
Thread factory generating daemon threads with a custom priority.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
ASYNC_OPTION
Option to send events asynchronously.
|
static String |
COMPRESSION_OPTION
Option specific to raven-java, allowing to enable/disable the compression of requests to the Sentry Server.
|
static String |
HIDE_COMMON_FRAMES_OPTION
Option to hide common stackframes with enclosing exceptions.
|
static String |
MAX_THREADS_OPTION
Option for the number of threads assigned for the connection.
|
static String |
NAIVE_PROTOCOL
Protocol setting to disable security checks over an SSL connection.
|
static String |
PRIORITY_OPTION
Option for the priority of threads assigned for the connection.
|
static String |
QUEUE_SIZE_OPTION
Option for the maximum size of the queue.
|
static String |
TIMEOUT_OPTION
Option specific to raven-java, allowing to set a timeout (in ms) for a request to the Sentry server.
|
| Constructor and Description |
|---|
DefaultRavenFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected Connection |
createAsyncConnection(Dsn dsn,
Connection connection)
Encapsulates an already existing connection in an
AsyncConnection and get the async options from the
Sentry DSN. |
protected Connection |
createConnection(Dsn dsn)
Creates a connection to the given DSN by determining the protocol.
|
protected Connection |
createHttpConnection(Dsn dsn)
Creates an HTTP connection to the Sentry server.
|
protected Marshaller |
createMarshaller(Dsn dsn)
Creates a JSON marshaller that will convert every
Event in a format
handled by the Sentry server. |
Raven |
createRavenInstance(Dsn dsn)
Creates an instance of Raven given a DSN.
|
protected Connection |
createUdpConnection(Dsn dsn)
Creates an UDP connection to the Sentry server.
|
protected Collection<String> |
getNotInAppFrames()
Provides a list of package names to consider as "not in-app".
|
ravenInstance, ravenInstance, ravenInstance, ravenInstance, registerFactorypublic static final String NAIVE_PROTOCOL
public static final String COMPRESSION_OPTION
public static final String TIMEOUT_OPTION
public static final String ASYNC_OPTION
public static final String MAX_THREADS_OPTION
public static final String PRIORITY_OPTION
public static final String QUEUE_SIZE_OPTION
public static final String HIDE_COMMON_FRAMES_OPTION
public Raven createRavenInstance(Dsn dsn)
RavenFactorycreateRavenInstance in class RavenFactorydsn - Data Source Name of the Sentry server.protected Connection createConnection(Dsn dsn)
dsn - Data Source Name of the Sentry server to use.protected Connection createAsyncConnection(Dsn dsn, Connection connection)
AsyncConnection and get the async options from the
Sentry DSN.dsn - Data Source Name of the Sentry server.connection - Connection to encapsulate in an AsyncConnection.protected Connection createHttpConnection(Dsn dsn)
dsn - Data Source Name of the Sentry server.HttpConnection to the server.protected Connection createUdpConnection(Dsn dsn)
dsn - Data Source Name of the Sentry server.UdpConnection to the server.protected Marshaller createMarshaller(Dsn dsn)
Event in a format
handled by the Sentry server.dsn - Data Source Name of the Sentry server.JsonMarshaller to process the events.protected Collection<String> getNotInAppFrames()
Those packages will be used with the StackTraceInterface to hide frames that aren't a part of
the main application.
Copyright © 2012–2014. All rights reserved.