public abstract class AbstractConnection extends Object implements Connection
Provide the basic tools to submit events to the server (authentication header, dsn).
To avoid spamming the network if and when Sentry is down, automatically lock the connection each time a
ConnectionException is caught.
| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_BASE_WAITING_TIME
Default base duration for a lockdown.
|
static long |
DEFAULT_MAX_WAITING_TIME
Default maximum duration for a lockdown.
|
static String |
SENTRY_PROTOCOL_VERSION
Current sentry protocol version.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractConnection(String publicKey,
String secretKey)
Creates a connection based on the public and secret keys.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
doSend(Event event)
Sends an event to the sentry server.
|
protected String |
getAuthHeader()
Creates an authentication header for the sentry protocol.
|
void |
send(Event event)
Sends an event to the sentry server.
|
void |
setBaseWaitingTime(long baseWaitingTime) |
void |
setMaxWaitingTime(long maxWaitingTime) |
public static final String SENTRY_PROTOCOL_VERSION
public static final long DEFAULT_MAX_WAITING_TIME
public static final long DEFAULT_BASE_WAITING_TIME
protected String getAuthHeader()
public final void send(Event event)
Connectionsend in interface Connectionevent - captured event to add in Sentry.protected abstract void doSend(Event event) throws ConnectionException
event - captured event to add in Sentry.ConnectionException - whenever a temporary exception due to the connection happened.public void setMaxWaitingTime(long maxWaitingTime)
public void setBaseWaitingTime(long baseWaitingTime)
Copyright © 2012–2014. All rights reserved.