com.appdynamics.eumagent.runtime
Class AgentConfiguration.Builder

java.lang.Object
  extended by com.appdynamics.eumagent.runtime.AgentConfiguration.Builder
Enclosing class:
AgentConfiguration

public static class AgentConfiguration.Builder
extends java.lang.Object

A class for setting up instances of AgentConfiguration.


Method Summary
 AgentConfiguration build()
          Generates the agent configuration based on the parameters passed through the other methods.
 AgentConfiguration.Builder withAppKey(java.lang.String appKey)
          Sets the application key used by the SDK.
 AgentConfiguration.Builder withApplicationName(java.lang.String applicationName)
          Sets the name of this mobile application.
 AgentConfiguration.Builder withCollectorChannelFactory(CollectorChannelFactory collectorChannelFactory)
          Sets the collector channel to use.
 AgentConfiguration.Builder withCollectorURL(java.lang.String collectorURL)
          Sets the URL of the collector to which the agent will report.
 AgentConfiguration.Builder withCompileTimeInstrumentationCheck(boolean enabled)
          Compile time instrumentation is required for supporting a number of features such as ANR, network calls reporting.
 AgentConfiguration.Builder withContext(android.content.Context context)
          Sets the application key used by the SDK.
 AgentConfiguration.Builder withDynamicInfoPointURL(java.lang.String infoPointURL)
          Set the URL of infopoint endpoint.
 AgentConfiguration.Builder withLoggingEnabled(boolean loggingEnabled)
          Sets whether debug logs are enabled or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

withAppKey

public AgentConfiguration.Builder withAppKey(java.lang.String appKey)
Sets the application key used by the SDK.

The application key is required.


withApplicationName

public AgentConfiguration.Builder withApplicationName(java.lang.String applicationName)
Sets the name of this mobile application.

This method is optional for building AgentConfiguration. The parameter applicationName should follow Java-language-style. It may contain uppercase or lowercase letters ('A' through 'Z'), numbers, and underscores ('_'). Individual package name parts may only start with letters. Reverse-DNS format is recommended.

NOTE: If building AgentConfiguration with this method, all data reported from this application is associated with applicationName, and appears together in dashboards. If not set, the default package name shall be used. Most users will not need this.


withContext

public AgentConfiguration.Builder withContext(android.content.Context context)
Sets the application key used by the SDK.

You should pass your Android application's application context to this method. The context is required.


withCollectorURL

public AgentConfiguration.Builder withCollectorURL(java.lang.String collectorURL)
Sets the URL of the collector to which the agent will report.

Only use this if you are using an on-premise collector.


withDynamicInfoPointURL

public AgentConfiguration.Builder withDynamicInfoPointURL(java.lang.String infoPointURL)
Set the URL of infopoint endpoint.

NOTE: Do not use this method unless you are using a separate dexgen server with your on-prem installation.


withLoggingEnabled

public AgentConfiguration.Builder withLoggingEnabled(boolean loggingEnabled)
Sets whether debug logs are enabled or not.

Not recommended for production use.


withCompileTimeInstrumentationCheck

public AgentConfiguration.Builder withCompileTimeInstrumentationCheck(boolean enabled)
Compile time instrumentation is required for supporting a number of features such as ANR, network calls reporting.

By default, agent will throw an exception if you attempt to start it without doing a compile time instrumentation(using one of our build plugins for ant/maven/gradle). You can disable this check by passing in 'false'.

Parameters:
enabled - if you want to disable this check, pass in false.
Returns:
itself

withCollectorChannelFactory

public AgentConfiguration.Builder withCollectorChannelFactory(CollectorChannelFactory collectorChannelFactory)
Sets the collector channel to use.

A custom collector channel allows you to have more control over how the SDK communicates with the collector. Most users will not use this mechanism.


build

public AgentConfiguration build()
Generates the agent configuration based on the parameters passed through the other methods.

Throws:
java.lang.NullPointerException - if a required parameter is null.