public class EmbeddedJarFilesImpl extends java.lang.Object implements EmbeddedJarFiles
| Modifier and Type | Field and Description |
|---|---|
static EmbeddedJarFiles |
INSTANCE |
| Constructor and Description |
|---|
EmbeddedJarFilesImpl() |
EmbeddedJarFilesImpl(java.lang.String[] jarFileNames) |
| Modifier and Type | Method and Description |
|---|---|
static void |
cleanupStaleTempJarFiles()
Cleanup any stale temporary agent jar files in the defined temp folder if a threshold has
been configured via the NEW_RELIC_TEMP_JARFILE_AGE_THRESHOLD_HOURS env variable or the
newrelic.config.temp_jarfile_age_threshold_hours system property.
|
java.lang.String[] |
getEmbeddedAgentJarFileNames()
Returns the names of the api jars that are embedded in the agent without their extension.
|
java.io.File |
getJarFileInAgent(java.lang.String jarNameWithoutExtension)
Returns a jar file created by reading the contents of a jar embedded inside of the agent jar and writing it out
to a temp file.
|
public static final EmbeddedJarFiles INSTANCE
public EmbeddedJarFilesImpl()
public EmbeddedJarFilesImpl(java.lang.String[] jarFileNames)
public static void cleanupStaleTempJarFiles()
A file is eligible to be deleted if it starts with one of the internal agent jar prefixes ("agent-bridge", "newrelic-api", etc.), has the ".jar" extension and is older than the specified cutoff value.
public java.io.File getJarFileInAgent(java.lang.String jarNameWithoutExtension)
throws java.io.IOException
EmbeddedJarFilesgetJarFileInAgent in interface EmbeddedJarFilesjava.io.IOExceptionpublic java.lang.String[] getEmbeddedAgentJarFileNames()
EmbeddedJarFilesgetEmbeddedAgentJarFileNames in interface EmbeddedJarFiles