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
Modifier and TypeFieldDescriptionprivate static final String
private Queue<org.apache.catalina.util.NetMask>
private String
The IP filter that is allowed to access the web panel of Ant Media Serverprivate String
Nme of the application which will ingestthe SRT Streams that don't have streamid.static final String
private boolean
The setting for customized marketplace build.private int
CPU load is measured for every period and this measurement is used to understand if server has enough CPU to handle new requestsprivate int
Measured CPU load are added to a list with this size and average of the measure CPU loads are calculated.static final String
private int
Server default HTTP port It's 5080 by defaultprivate static String
private boolean
Enable heart beat for Ant Media Serverprivate String
private String
private boolean
Server JWT Control Enabled to access the REST API of the web panelprivate String
Server JWT secret key "afw7Zz9MqvLiheA5X3GFEKvLWb1JTKC2"private String
Customer License Keyprivate static String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
private static org.slf4j.Logger
private String
private String
Name of the marketplaceprivate String
Native Log Level is used for ffmpeg and WebRTC logsprivate String
private boolean
if the license is offline.private int
The port that is opened by origin in cluster mode.private String
The proxy IP address and port for license checking.private int
The RTMP port that server opens to listen incoming RTMP connectionsprivate static final long
private String
Fully Qualified Domain Name of the Server.private String
Server status webhook url.private static final String
private static final String
private static final String
static final String
static final String
jwt server filter controlstatic final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private int
The SRT port that server opens to listen incoming SRT connectionsprivate boolean
private boolean
Use global IP address for especially in cluster communicationprivate Logging.Severity
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfillFromInput
(String input, Queue<org.apache.catalina.util.NetMask> target) Fill aNetMask
list from a string input containing a comma-separated list of (hopefully valid)NetMask
s.static InetAddress
getAddress
(Enumeration<InetAddress> inetAddresses) Queue<org.apache.catalina.util.NetMask>
int
int
int
static String
static String
static Enumeration<NetworkInterface>
static InetAddress
int
int
int
boolean
boolean
boolean
static boolean
isLoopBackOrDown
(NetworkInterface networkInterface) boolean
boolean
boolean
void
setAllowedDashboardCIDR
(String allowedDashboardCIDR) the getAllowedCIDRList and setAllowedCIDRList are synchronized because ArrayList may throw concurrent modificationvoid
setAppIngestsSrtStreamsWithoutStreamId
(String appIngestsSrtStreamsWithoutStreamId) void
setApplicationContext
(ApplicationContext applicationContext) void
setBuildForMarket
(boolean buildForMarket) void
setCpuMeasurementPeriodMs
(int cpuMeasurementPeriodMs) void
setCpuMeasurementWindowSize
(int cpuMeasurementWindowSize) void
setDefaultHttpPort
(int defaultHttpPort) void
setHeartbeatEnabled
(boolean heartbeatEnabled) void
setJwksURL
(String jwksURL) void
setJwtServerControlEnabled
(boolean jwtServerControlEnabled) void
setJwtServerSecretKey
(String jwtServerSecretKey) void
setLicenceKey
(String licenceKey) void
setLogLevel
(String logLevel) void
setMarketplace
(String marketplace) void
setNativeLogLevel
(String nativeLogLevel) void
setNodeGroup
(String nodeGroup) void
setOfflineLicense
(boolean offlineLicense) void
setOriginServerPort
(int originServerPort) void
setProxyAddress
(String proxyAddress) void
setServerName
(String serverName) void
setServerStatusWebHookURL
(String serverStatusWebHookURL) void
setSrtPort
(int srtPort) void
setSslEnabled
(boolean sslEnabled) void
setUseGlobalIp
(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:
-
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 -
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
-
-
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
-
isLoopBackOrDown
- Throws:
SocketException
-
getAddress
-
getLocalHostAddress
-
setApplicationContext
- Specified by:
setApplicationContext
in 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 aNetMask
list from a string input containing a comma-separated list of (hopefully valid)NetMask
s.- 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
-