Class AprLifecycleListener
java.lang.Object
org.apache.catalina.core.AprLifecycleListener
- All Implemented Interfaces:
LifecycleListener
Implementation of
LifecycleListener that will init and destroy APR.
This listener must only be nested within Server elements.
Only one instance of the APR/Native library may be loaded per JVM. Loading multiple instances will trigger a JVM crash - typically when the Connectors are destroyed. This listener utilises reference counting to ensure that only one instance of the APR/Native library is loaded at any one time.
If multiple listener configurations are found, only the first one initialised will be used.
- Since:
- 4.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static Stringprotected static booleanprotected static final StringManagerThe string manager for this package.protected static Stringprotected static booleanprotected static Stringprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringGet the installed APR version string, if available.static StringGet the installed OpenSSL version string (via APR), if available.static StringGet the installed Tomcat Native version string, if available.static StringGet a warning message if the installed Tomcat Native version is older than recommended.static booleanstatic booleanbooleanstatic booleanvoidlifecycleEvent(LifecycleEvent event) Primary entry point for startup and shutdown events.voidsetFIPSMode(String FIPSMode) voidsetSSLEngine(String SSLEngine) voidsetSSLRandomSeed(String SSLRandomSeed) voidsetUseOpenSSL(boolean useOpenSSL)
-
Field Details
-
sm
The string manager for this package. -
TCN_REQUIRED_MAJOR
protected static final int TCN_REQUIRED_MAJOR- See Also:
-
TCN_REQUIRED_MINOR
protected static final int TCN_REQUIRED_MINOR- See Also:
-
TCN_REQUIRED_PATCH
protected static final int TCN_REQUIRED_PATCH- See Also:
-
TCN_RECOMMENDED_MAJOR
protected static final int TCN_RECOMMENDED_MAJOR- See Also:
-
TCN_RECOMMENDED_MINOR
protected static final int TCN_RECOMMENDED_MINOR- See Also:
-
TCN_RECOMMENDED_PV
protected static final int TCN_RECOMMENDED_PV- See Also:
-
SSLEngine
-
FIPSMode
-
SSLRandomSeed
-
sslInitialized
protected static boolean sslInitialized -
fipsModeActive
protected static boolean fipsModeActive
-
-
Constructor Details
-
AprLifecycleListener
public AprLifecycleListener()
-
-
Method Details
-
isAprAvailable
public static boolean isAprAvailable() -
getInstalledTcnVersion
Get the installed Tomcat Native version string, if available.- Returns:
- the version string, or null if APR is not available
-
getInstalledAprVersion
Get the installed APR version string, if available.- Returns:
- the APR version string, or null if APR is not available
-
getInstalledOpenSslVersion
Get the installed OpenSSL version string (via APR), if available.- Returns:
- the OpenSSL version string, or null if not available
-
getTcnVersionWarning
Get a warning message if the installed Tomcat Native version is older than recommended. This performs the same version check used during Tomcat startup.- Returns:
- a warning message if the installed version is outdated, or null if the version is acceptable or APR is not available
-
lifecycleEvent
Primary entry point for startup and shutdown events.- Specified by:
lifecycleEventin interfaceLifecycleListener- Parameters:
event- The event that has occurred
-
getSSLEngine
-
setSSLEngine
-
getSSLRandomSeed
-
setSSLRandomSeed
-
getFIPSMode
-
setFIPSMode
-
isFIPSModeActive
public boolean isFIPSModeActive() -
setUseOpenSSL
public void setUseOpenSSL(boolean useOpenSSL) -
getUseOpenSSL
public static boolean getUseOpenSSL() -
isInstanceCreated
public static boolean isInstanceCreated()
-