public class NewRelicClientImpl extends Object implements NewRelicClient
Modifier and Type | Field and Description |
---|---|
static String |
API_HOST |
static String |
API_SCHEME |
static String |
APPLICATIONS_ENDPOINT |
static String |
DEPLOYMENT_ENDPOINT |
static String |
PAGE_PARAMETER |
static int |
PAGE_SIZE |
Constructor and Description |
---|
NewRelicClientImpl() |
Modifier and Type | Method and Description |
---|---|
String |
getApiEndpoint()
Get API Endpoint URL for looking up credentials.
|
List<Application> |
getApplications(String apiKey)
Get the list of applications available to record deployment notifications for.
|
protected org.apache.http.impl.client.CloseableHttpClient |
getHttpClient(String host) |
void |
sendNotification(String apiKey,
String applicationId,
String description,
String revision,
String changelog,
String user)
Submit deployment notification
|
public static final String API_SCHEME
public static final String API_HOST
public static final String DEPLOYMENT_ENDPOINT
public static final String APPLICATIONS_ENDPOINT
public static final String PAGE_PARAMETER
public static final int PAGE_SIZE
public List<Application> getApplications(String apiKey) throws IOException
getApplications
in interface NewRelicClient
apiKey
- New Relic API keyIOException
- when HttpClient is not able to be closedpublic void sendNotification(String apiKey, String applicationId, String description, String revision, String changelog, String user) throws IOException
sendNotification
in interface NewRelicClient
apiKey
- New Relic API keyapplicationId
- Application to register deployment fordescription
- Text annotation for the deploymentrevision
- The revision number from your source control systemchangelog
- A list of changes for this deploymentuser
- The name of the user/process that triggered this deploymentIOException
- when HttpClient is not able to be closed or unexpected status code receivedpublic String getApiEndpoint()
getApiEndpoint
in interface NewRelicClient
protected org.apache.http.impl.client.CloseableHttpClient getHttpClient(String host)
Copyright © 2016–2021. All rights reserved.