Package io.antmedia.settings
Class ServerSettings
java.lang.Object
io.antmedia.settings.ServerSettings
- All Implemented Interfaces:
Serializable,Aware,ApplicationContextAware
@PropertySource("/conf/red5.properties")
public class ServerSettings
extends Object
implements ApplicationContextAware, Serializable
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate Queue<org.apache.catalina.util.NetMask>private StringThe IP filter that is allowed to access the web panel of Ant Media Serverprivate StringNme of the application which will ingestthe SRT Streams that don't have streamid.static final Stringprivate booleanThe setting for customized marketplace build.private intCPU load is measured for every period and this measurement is used to understand if server has enough CPU to handle new requestsprivate intMeasured CPU load are added to a list with this size and average of the measure CPU loads are calculated.static final Stringprivate intServer default HTTP port It's 5080 by defaultprivate static Stringprivate booleanEnable heart beat for Ant Media Serverprivate Stringprivate Stringprivate booleanServer JWT Control Enabled to access the REST API of the web panelprivate StringServer JWT secret key "afw7Zz9MqvLiheA5X3GFEKvLWb1JTKC2"private StringCustomer License Keyprivate static final Stringprivate static Stringprivate StringCustomer License Keystatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprivate static org.slf4j.Loggerprivate Stringprivate StringName of the marketplaceprivate StringNative Log Level is used for ffmpeg and WebRTC logsprivate Stringprivate booleanif the license is offline.private intThe port that is opened by origin in cluster mode.private StringThe proxy IP address and port for license checking.private intThe RTMP port that server opens to listen incoming RTMP connectionsprivate static final Stringprivate static booleanRTMPS enabled or not.private static final longprivate StringFully Qualified Domain Name of the Server.private StringServer status webhook url.private static final Stringprivate static final Stringprivate static final Stringstatic final Stringstatic final Stringjwt server filter controlstatic final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate intThe SRT port that server opens to listen incoming SRT connectionsprivate booleanprivate booleanUse global IP address for especially in cluster communicationprivate Logging.Severity -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfillFromInput(String input, Queue<org.apache.catalina.util.NetMask> target) Fill aNetMasklist from a string input containing a comma-separated list of (hopefully valid)NetMasks.Queue<org.apache.catalina.util.NetMask>intintintstatic Stringstatic Stringstatic Enumeration<NetworkInterface>static InetAddressintintintbooleanbooleanbooleanbooleanstatic booleanbooleanbooleanvoidsetAllowedDashboardCIDR(String allowedDashboardCIDR) the getAllowedCIDRList and setAllowedCIDRList are synchronized because ArrayList may throw concurrent modificationvoidsetAppIngestsSrtStreamsWithoutStreamId(String appIngestsSrtStreamsWithoutStreamId) voidsetApplicationContext(ApplicationContext applicationContext) voidsetBuildForMarket(boolean buildForMarket) voidsetCpuMeasurementPeriodMs(int cpuMeasurementPeriodMs) voidsetCpuMeasurementWindowSize(int cpuMeasurementWindowSize) voidsetDefaultHttpPort(int defaultHttpPort) voidsetHeartbeatEnabled(boolean heartbeatEnabled) voidsetJwksURL(String jwksURL) voidsetJwtServerControlEnabled(boolean jwtServerControlEnabled) voidsetJwtServerSecretKey(String jwtServerSecretKey) voidsetLicenceKey(String licenceKey) voidsetLocalLicenceServerIps(String localLicenceServerIps) voidsetLogLevel(String logLevel) voidsetMarketplace(String marketplace) voidsetNativeLogLevel(String nativeLogLevel) voidsetNodeGroup(String nodeGroup) voidsetOfflineLicense(boolean offlineLicense) voidsetOriginServerPort(int originServerPort) voidsetProxyAddress(String proxyAddress) voidsetRtmpsEnabled(boolean rtmpsEnabled) Set the RTMPS enabled or not java:S2696 is suppressed because this method is used by SpringvoidsetServerName(String serverName) voidsetServerStatusWebHookURL(String serverStatusWebHookURL) voidsetSrtPort(int srtPort) voidsetSslEnabled(boolean sslEnabled) voidsetUseGlobalIp(boolean useGlobalIp)
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
BEAN_NAME
- See Also:
-
SETTINGS_HEART_BEAT_ENABLED
- See Also:
-
SETTINGS_USE_GLOBAL_IP
- See Also:
-
SETTINGS_PROXY_ADDRESS
- See Also:
-
SETTINGS_NODE_GROUP
- See Also:
-
LOG_LEVEL_ALL
- See Also:
-
LOG_LEVEL_TRACE
- See Also:
-
LOG_LEVEL_DEBUG
- See Also:
-
LOG_LEVEL_INFO
- See Also:
-
LOG_LEVEL_WARN
- See Also:
-
LOG_LEVEL_ERROR
- See Also:
-
LOG_LEVEL_OFF
- See Also:
-
DEFAULT_NODE_GROUP
- See Also:
-
SETTINGS_CPU_MEASUREMENT_PERIOD_MS
- See Also:
-
SETTINGS_CPU_MEASUREMENT_WINDOW_SIZE
- See Also:
-
SETTINGS_SERVER_DEFAULT_HTTP_PORT
- See Also:
-
SETTINGS_ORIGIN_PORT
- See Also:
-
SETTINGS_SRT_PORT
- See Also:
-
SETTINGS_RTMP_PORT
- See Also:
-
ALLOWED_DASH_BOARD_CIDR
- See Also:
-
SETTINGS_NATIVE_LOG_LEVEL
- See Also:
-
SETTINGS_LOG_LEVEL
- See Also:
-
SETTINGS_LICENSE_KEY
- See Also:
-
SETTINGS_SERVER_NAME
- See Also:
-
SETTINGS_MARKET_PLACE_NAME
- See Also:
-
SETTINGS_JWT_SERVER_SECRET_KEY
- See Also:
-
SETTINGS_JWT_SERVER_CONTROL_ENABLED
jwt server filter control- See Also:
-
SETTINGS_JWKS_URL
- See Also:
-
SETTINGS_SERVER_STATUS_WEBHOOK_URL
- See Also:
-
RTMPS_ENABLED
- See Also:
-
LOCAL_LICENCE_SERVER_IP
- See Also:
-
allowedDashboardCIDR
The IP filter that is allowed to access the web panel of Ant Media Server -
allowedCIDRList
-
logger
private static org.slf4j.Logger logger -
localHostAddress
-
globalHostAddress
-
hostAddress
-
serverName
Fully Qualified Domain Name of the Server. It's used in SSL as well. -
licenceKey
Customer License Key -
buildForMarket
private boolean buildForMarketThe setting for customized marketplace build. It's initialized by getting the value from the LicenceBean -
marketplace
Name of the marketplace -
logLevel
-
offlineLicense
private boolean offlineLicenseif the license is offline. It checks license key against hardware So license key should be provided by Ant Media specifically. It's initialized by getting the value from the LicenceBean -
nativeLogLevel
Native Log Level is used for ffmpeg and WebRTC logs -
heartbeatEnabled
Enable heart beat for Ant Media Server -
useGlobalIp
Use global IP address for especially in cluster communication -
proxyAddress
The proxy IP address and port for license checking. If there is a proxy in front of Ant Media Server(reverse proxy) please enter its IP and port The format will be: for example: 192.168.0.1:3012 -
nodeGroup
-
webrtcLogLevel
-
cpuMeasurementPeriodMs
CPU load is measured for every period and this measurement is used to understand if server has enough CPU to handle new requests -
cpuMeasurementWindowSize
Measured CPU load are added to a list with this size and average of the measure CPU loads are calculated. It's used to check CPU has enough CPU resource -
defaultHttpPort
Server default HTTP port It's 5080 by default -
jwtServerControlEnabled
Server JWT Control Enabled to access the REST API of the web panel -
jwtServerSecretKey
Server JWT secret key "afw7Zz9MqvLiheA5X3GFEKvLWb1JTKC2" -
jwksURL
-
originServerPort
The port that is opened by origin in cluster mode. Edges are connected to the origin through this port. -
srtPort
The SRT port that server opens to listen incoming SRT connections -
appIngestsSrtStreamsWithoutStreamId
@Value("${appIngestsSrtStreamsWithoutStreamId:LiveApp}") private String appIngestsSrtStreamsWithoutStreamIdNme of the application which will ingestthe SRT Streams that don't have streamid. -
sslEnabled
private boolean sslEnabled -
rtmpsEnabled
private static boolean rtmpsEnabledRTMPS enabled or not. Pay attention that we inject value for setter methodsetRtmpsEnabled(boolean) -
rtmpPort
The RTMP port that server opens to listen incoming RTMP connections -
serverStatusWebHookURL
Server status webhook url. It's called for several errors such - high resource usage - Unexpected shutdown -
localLicenceServerIps
Customer License Key
-
-
Constructor Details
-
ServerSettings
public ServerSettings()
-
-
Method Details
-
getJwksURL
-
setJwksURL
-
isBuildForMarket
public boolean isBuildForMarket() -
setBuildForMarket
public void setBuildForMarket(boolean buildForMarket) -
getLicenceKey
-
setLicenceKey
-
getServerName
-
setServerName
-
getLogLevel
-
setLogLevel
-
isHeartbeatEnabled
public boolean isHeartbeatEnabled() -
setHeartbeatEnabled
public void setHeartbeatEnabled(boolean heartbeatEnabled) -
getHostAddress
-
getGlobalHostAddress
-
getNetworkInterfaces
- Throws:
SocketException
-
getNoneLoopbackHostAddress
-
getLocalHostAddress
-
setApplicationContext
- Specified by:
setApplicationContextin interfaceApplicationContextAware- Throws:
BeansException
-
getHostAddressFromEnvironment
-
isUseGlobalIp
public boolean isUseGlobalIp() -
setUseGlobalIp
public void setUseGlobalIp(boolean useGlobalIp) -
setProxyAddress
-
getProxyAddress
-
setAllowedDashboardCIDR
the getAllowedCIDRList and setAllowedCIDRList are synchronized because ArrayList may throw concurrent modification- Parameters:
allowedDashboardCIDR-
-
getAllowedDashboardCIDR
-
getAllowedCIDRList
-
fillFromInput
Fill aNetMasklist from a string input containing a comma-separated list of (hopefully valid)NetMasks.- Parameters:
input- The input stringtarget- The list to fill- Returns:
- a string list of processing errors (empty when no errors)
-
getNativeLogLevel
-
setNativeLogLevel
-
getWebRTCLogLevel
-
getNodeGroup
-
setNodeGroup
-
getCpuMeasurementPeriodMs
public int getCpuMeasurementPeriodMs() -
setCpuMeasurementPeriodMs
public void setCpuMeasurementPeriodMs(int cpuMeasurementPeriodMs) -
getCpuMeasurementWindowSize
public int getCpuMeasurementWindowSize() -
setCpuMeasurementWindowSize
public void setCpuMeasurementWindowSize(int cpuMeasurementWindowSize) -
getDefaultHttpPort
public int getDefaultHttpPort() -
setDefaultHttpPort
public void setDefaultHttpPort(int defaultHttpPort) -
getOriginServerPort
public int getOriginServerPort() -
setOriginServerPort
public void setOriginServerPort(int originServerPort) -
getSrtPort
public int getSrtPort() -
setSrtPort
public void setSrtPort(int srtPort) -
getRtmpPort
public int getRtmpPort() -
getMarketplace
-
setMarketplace
-
getJwtServerSecretKey
-
setJwtServerSecretKey
-
isJwtServerControlEnabled
public boolean isJwtServerControlEnabled() -
setJwtServerControlEnabled
public void setJwtServerControlEnabled(boolean jwtServerControlEnabled) -
isSslEnabled
public boolean isSslEnabled() -
setSslEnabled
public void setSslEnabled(boolean sslEnabled) -
getServerStatusWebHookURL
-
setServerStatusWebHookURL
-
isOfflineLicense
public boolean isOfflineLicense() -
setOfflineLicense
public void setOfflineLicense(boolean offlineLicense) -
getAppIngestsSrtStreamsWithoutStreamId
-
setAppIngestsSrtStreamsWithoutStreamId
-
isRtmpsEnabled
public static boolean isRtmpsEnabled() -
setRtmpsEnabled
Set the RTMPS enabled or not java:S2696 is suppressed because this method is used by Spring- Parameters:
rtmpsEnabled-
-
getLocalLicenceServerIps
-
setLocalLicenceServerIps
-