public class HttpConnection extends AbstractConnection
It is possible to enable the "naive mode" to allow a connection over SSL using a certificate with a wildcard.
DEFAULT_BASE_WAITING_TIME, DEFAULT_MAX_WAITING_TIME, SENTRY_PROTOCOL_VERSION| Constructor and Description |
|---|
HttpConnection(URL sentryUrl,
String publicKey,
String secretKey)
Creates an HTTP connection to a Sentry server.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
doSend(Event event)
Sends an event to the sentry server.
|
protected HttpURLConnection |
getConnection()
Opens a connection to the Sentry API allowing to send new events.
|
static URL |
getSentryApiUrl(URI sentryUri,
String projectId)
Automatically determines the URL to the HTTP API of Sentry.
|
void |
setBypassSecurity(boolean bypassSecurity) |
void |
setMarshaller(Marshaller marshaller) |
void |
setTimeout(int timeout) |
getAuthHeader, send, setBaseWaitingTime, setMaxWaitingTimepublic static URL getSentryApiUrl(URI sentryUri, String projectId)
sentryUri - URI of the Sentry instance.projectId - unique identifier of the current project.protected HttpURLConnection getConnection()
protected void doSend(Event event)
AbstractConnectiondoSend in class AbstractConnectionevent - captured event to add in Sentry.public void setTimeout(int timeout)
public void setMarshaller(Marshaller marshaller)
public void setBypassSecurity(boolean bypassSecurity)
public void close()
throws IOException
IOExceptionCopyright © 2012–2014. All rights reserved.