Package com.wowza.wms.server
Interface IServer
public interface IServer
IServer: public interface to Server object.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionboolean
addAuthorizedRESTAPI
(Class classType) Returns true if the class has been added to the REST API.boolean
addAuthorizedRESTAPI
(Class classType, String url) Returns true if the class has been added to the REST API at the specified URLvoid
addLogListener
(ILogNotify logListener) Add a log event listenervoid
addServerListener
(IServerNotify serverListener) Add server listenerboolean
addUnAuthorizedRESTAPI
(Class classType) Returns true if the class has been added to the REST API.boolean
addUnAuthorizedRESTAPI
(Class classType, String url) Returns true if the class has been added to the REST API at the specified URLcom.wowza.wms.admin.AdminAgent
Get the JMX interfaceGet the admin guidGet the list of objects exposed through JMX interfacecom.wowza.util.RandomIdGenerator
Get the client id generator for the serverint
Get the client ID generator recycle delay sizeint
Get the client ID generator recycle sizelong
Get the client ID generator timeoutcom.wowza.wms.server.CommandInterfaceCommandHandler
Get the command interface command handlerGet the definition of the command interfacelong
Get the committed virtual memoryGet the server connection counter.com.wowza.wms.client.ConnectionCounterSimple
getConnectionCounter
(int counterIndex) Get the server connection counter for a specific technology (see IVHost.COUNTER_*)long
Returns maximum number of connections allowed to the server (-1 means unlimited)int
Get the handler core thread pool size.int
Get the transport core thread pool size.long
Get the current heap sizeGet the date and time the server was started.Get the default stream prefix used if the stream name does not include a prefix (default is mp4)Get the dynamic log properties defined at the server level in conf/log4j.propertiesgetGUID()
Get the base guidGet the server handler thread pool.Get the Server header used for HTTP responsesGet the server performance counter.getIoPerformanceCounter
(int counterIndex) Get the server performance counter for a specific technology (see IVHost.COUNTER_*)long
Get the current number of live stream transcoder sessions.long
Get the count of live threadsGet a copy of the log event listener listGet server's manager's properties collectionlong
Get the max heap sizelong
Get the count of peak threadsGet server level properties collectioncom.wowza.wms.server.Server.ProtocolUsageSessionTracker
Get the server level protocol usage trackerlong
Get the maximum number of streams that can be published to the serverGet the server level push publishing usage trackercom.wowza.wms.rest.restserver.RESTUsageTracker
Get the server level REST usage trackerGet the Server header used for RTMPT responsesGet the server guidGet the session guidGet the server handler thread pool.com.wowza.wms.transcoder.thumbnailer.ThumbnailerUsageTracker
Get the server level thumbnail usage trackerGet a formatted String of how long the server has been running.double
Get time running in secondscom.wowza.wms.transcoder.capture.TranscoderCaptureManager
Get the transcoder capture managercom.wowza.wms.transcoder.model.TranscoderContextServer
Get the server level transcoder contextlong
Get the total number of transcoder licenses in use.long
Get the total number of transcoder licenses (-1 means unlimited - subscription)com.wowza.wms.server.TranscoderUsageTracker
Get the server level live transcoder usage trackercom.wowza.wms.transcoder.vod.TranscoderVODUsageTracker
Get the server level VOD transcoder usage trackerGet the server transport thread pool.com.wowza.wms.server.ServerTuningHandler
Get the handler that control automatic server tuningcom.wowza.wms.transport.udp.UDPPortManager
Get the UDP port manager which manages the allocation of incoming UDP port binding to be sure there are not port conflictscom.wowza.wms.transport.udp.UDPPortSharingManager
Get the UDP port sharing manager.String[]
Get a pipe "|" delimited list of user agents that the server recognizes as RTMPT client.Get server version number.Returns the interface to the VHostList for the serverboolean
If true, WOWZ connections will use the WOWZ protocol.boolean
Returns true if DRM is properly licensed.boolean
Returns true if DRM is in-use.boolean
Returns true if nDVR is properly licensed.boolean
Returns true if nDVR is in-use.boolean
isDynamicLogContextLoaded
(String logContext) Returns true of the given dynamic log context is already loaded.boolean
Returns true if HTTP origin is properly licensed.boolean
If true, NetConnection attempts will use the WOWZ protocol when possible.boolean
If true, stdout log4j appender is removed from logging configuration if running as a service.boolean
Returns true if Push Publish is properly licensed.boolean
Returns true if REST API is properly licensed.boolean
Returns true if REST API documentation server is enabledboolean
Returns true if REST API is enabledboolean
Is the server current suspendedboolean
Return true if transcoder has a watermarkboolean
isVHostRunning
(String name) Returns true if the name provided is a running VHost namereadConfig
(String sName) Method to read xml config file..void
Reload the VHosts.xml file.boolean
removeLogListener
(ILogNotify logListener) Remove a log event listenervoid
removeServerListener
(IServerNotify serverListener) Remove server listenervoid
setAcceptWOWZConnections
(boolean acceptWOWZConnections) If true, WOWZ connections will use the WOWZ protocol.void
setCommandInterfaceHostPort
(HostPort commandInterfaceHostPort) Set the definition for the command interface.void
setCoreHandlerPoolSize
(int corePoolSize) Set the handler core thread pool size.void
setCoreTransportPoolSize
(int corePoolSize) Set the transport core thread pool size.void
setDefaultStreamPrefix
(String defaultStreamPrefix) Set the default stream prefix used if the stream name does not include a prefix (default is mp4)void
setDynamicLogProperties
(Properties dynamicLogProperties) Set the dynamic log properties set at the server levelvoid
setHTTPHeaderServer
(String httpHeaderServer) Set the Server header used for HTTP responsesvoid
setInitiateWOWZConnections
(boolean initiateWOWZConnections) If true, NetConnection attempts will use the WOWZ protocol when possible.void
setLoggingRemoveStdoutIfRunningAsService
(boolean loggingRemoveStdoutIfRunningAsService) If true, stdout log4j appender is removed from logging configuration if running as a service.void
setRestDocumentationServerEnabled
(boolean restDocumentationServerEnabled) Sets if REST API documentation server will be enabledvoid
setRestServerEnabled
(boolean restServerEnabled) Sets if REST API server will be enabledvoid
setRTMPTHeaderServer
(String rtmptHeaderServer) Set the Server header used for RTMPT responsesvoid
setUserAgents
(String[] userAgents) Set a pipe "|" delimited list of user agents that the server recognizes as RTMPT client.void
Start the command interface as defined in Server.xml.void
Starts the statistics manager to collect server and application statisticsvoid
startVHost
(String vhostName) Start a vHost by name.void
Start all vHostsvoid
Stop the JMX interfacevoid
Stop the command interface as defined in Server.xml.void
Stops the statistics managervoid
Stop a vHost by name.void
Stop all vHostsvoid
Suspend all virtual hosts (Calls IVHost.suspendAllHostPorts for each vhost)void
Suspend the command interface as defined in Server.xml.void
Suspend all virtual hosts and the command interfacevoid
Unbind all virtual hosts (Calls IVHost.unbindAllHostPorts for each vhost)boolean
writeConfig
(String sName, String data) Method to write xml config file..
-
Field Details
-
SERVER_DEFAULT
- See Also:
-
-
Method Details
-
startCommandInterface
void startCommandInterface()Start the command interface as defined in Server.xml. The command interface is used by shutdown.sh script to stop the server. It is also used by ant task to stop and start the server on build events. -
stopCommandInterface
void stopCommandInterface()Stop the command interface as defined in Server.xml. The command interface is used by shutdown.sh script to stop the server. It is also used by ant task to stop and start the server on build events. -
suspendCommandInterface
void suspendCommandInterface()Suspend the command interface as defined in Server.xml. The command interface is used by shutdown.sh script to stop the server. It is also used by ant task to stop and start the server on build events. -
getVersion
String getVersion()Get server version number.- Returns:
- server version number
-
reloadVHostConfig
void reloadVHostConfig()Reload the VHosts.xml file. This method can be invoked through the JMX interface to manage vHosts while the server is running. -
stopVHost
Stop a vHost by name.- Parameters:
vhostName
- vHost name
-
stopVHosts
void stopVHosts()Stop all vHosts -
isVHostRunning
Returns true if the name provided is a running VHost name- Parameters:
name
- of a running VHost- Returns:
- true if the name provided is a running VHost name
-
startVHost
Start a vHost by name.- Parameters:
vhostName
- vHost name
-
startVHosts
void startVHosts()Start all vHosts -
getIoPerformanceCounter
IOPerformanceCounter getIoPerformanceCounter()Get the server performance counter.- Returns:
- io performance counter
-
getIoPerformanceCounter
Get the server performance counter for a specific technology (see IVHost.COUNTER_*)- Parameters:
counterIndex
- counter index (see IVHost.COUNTER_*)- Returns:
- io performance counter
-
getConnectionCounter
ConnectionCounter getConnectionCounter()Get the server connection counter.- Returns:
- connection counter
-
getPublishersMaximum
long getPublishersMaximum()Get the maximum number of streams that can be published to the server- Returns:
- maximum number of streams that can be published to the server
-
getConnectionCounter
com.wowza.wms.client.ConnectionCounterSimple getConnectionCounter(int counterIndex) Get the server connection counter for a specific technology (see IVHost.COUNTER_*)- Parameters:
counterIndex
- counter index (see IVHost.COUNTER_*)- Returns:
- connection counter
-
getDateStarted
String getDateStarted()Get the date and time the server was started.- Returns:
- date and time the server was started
-
getTimeRunning
String getTimeRunning()Get a formatted String of how long the server has been running.- Returns:
- formatted String of how long the server has been running
-
getTimeRunningSeconds
double getTimeRunningSeconds()Get time running in seconds- Returns:
- time running in seconds
-
getCommandInterfaceHostPort
HostPort getCommandInterfaceHostPort()Get the definition of the command interface- Returns:
- host port definition of command interface
-
setCommandInterfaceHostPort
Set the definition for the command interface.- Parameters:
commandInterfaceHostPort
- host port definition of command interface
-
getUserAgents
String[] getUserAgents()Get a pipe "|" delimited list of user agents that the server recognizes as RTMPT client.- Returns:
- pipe "|" delimited list of user agents that the server recognizes as RTMPT client
-
setUserAgents
Set a pipe "|" delimited list of user agents that the server recognizes as RTMPT client.- Parameters:
userAgents
- pipe "|" delimited list of user agents that the server recognizes as RTMPT client
-
addServerListener
Add server listener- Parameters:
serverListener
- server listener
-
removeServerListener
Remove server listener- Parameters:
serverListener
- server listener
-
getAdminInterfaceObjectList
List getAdminInterfaceObjectList()Get the list of objects exposed through JMX interface- Returns:
- list of objects exposed through JMX interface
-
getCoreTransportPoolSize
int getCoreTransportPoolSize()Get the transport core thread pool size.- Returns:
- default core thread pool size
-
setCoreTransportPoolSize
void setCoreTransportPoolSize(int corePoolSize) Set the transport core thread pool size.- Parameters:
corePoolSize
- core thread pool size
-
getCoreHandlerPoolSize
int getCoreHandlerPoolSize()Get the handler core thread pool size.- Returns:
- default core thread pool size
-
setCoreHandlerPoolSize
void setCoreHandlerPoolSize(int corePoolSize) Set the handler core thread pool size.- Parameters:
corePoolSize
- core thread pool size
-
getThreadPool
ThreadPool getThreadPool()Get the server handler thread pool. Same as getHandlerThreadPool.- Returns:
- server handler thread pool
-
getTransportThreadPool
ThreadPool getTransportThreadPool()Get the server transport thread pool. This thread pool is used to read/write data from the transports sockets.- Returns:
- server transport thread pool
-
getHandlerThreadPool
ThreadPool getHandlerThreadPool()Get the server handler thread pool. This thread pool is used to process the incoming events.- Returns:
- server handler thread pool
-
getProperties
WMSProperties getProperties()Get server level properties collection- Returns:
- server level properties collection
-
getManagerProperties
WMSProperties getManagerProperties()Get server's manager's properties collection- Returns:
- manager's property collection
-
getClientIdGenerator
com.wowza.util.RandomIdGenerator getClientIdGenerator()Get the client id generator for the server- Returns:
- client id generator for the server
-
getDynamicLogProperties
Properties getDynamicLogProperties()Get the dynamic log properties defined at the server level in conf/log4j.properties- Returns:
- dynamic log properties defined at the server level
-
setDynamicLogProperties
Set the dynamic log properties set at the server level- Parameters:
dynamicLogProperties
- dynamic log properties defined at the server level
-
isDynamicLogContextLoaded
Returns true of the given dynamic log context is already loaded. If not loaded it will return false and add it to the a Set of loaded log context. Log context is [VHost].[Application].[AppInstance] -
getVHostList
VHostList getVHostList()Returns the interface to the VHostList for the server- Returns:
- vhostList
-
suspendAllVHosts
void suspendAllVHosts()Suspend all virtual hosts (Calls IVHost.suspendAllHostPorts for each vhost) -
unbindAllVHosts
void unbindAllVHosts()Unbind all virtual hosts (Calls IVHost.unbindAllHostPorts for each vhost) -
suspendServer
void suspendServer()Suspend all virtual hosts and the command interface -
isSuspended
boolean isSuspended()Is the server current suspended -
stopAdminAgent
void stopAdminAgent()Stop the JMX interface -
getAdminAgent
com.wowza.wms.admin.AdminAgent getAdminAgent()Get the JMX interface- Returns:
- JMX Admin agent
-
getSessionGUID
String getSessionGUID()Get the session guid- Returns:
- session guid
-
getServerGUID
String getServerGUID()Get the server guid- Returns:
- server guid
-
getGUID
String getGUID()Get the base guid- Returns:
- base guid
-
getAdminGUID
String getAdminGUID()Get the admin guid- Returns:
- admin guid
-
getUDPPortManager
com.wowza.wms.transport.udp.UDPPortManager getUDPPortManager()Get the UDP port manager which manages the allocation of incoming UDP port binding to be sure there are not port conflicts- Returns:
- UDP port manager
-
getUDPPortSharingManager
com.wowza.wms.transport.udp.UDPPortSharingManager getUDPPortSharingManager()Get the UDP port sharing manager.- Returns:
- UDP port sharing manager
-
getLiveThreads
long getLiveThreads()Get the count of live threads- Returns:
- count of live threads
-
getPeakThreads
long getPeakThreads()Get the count of peak threads- Returns:
- count of peak threads
-
getCurrentHeapSize
long getCurrentHeapSize()Get the current heap size- Returns:
- current heap size
-
getMaxHeapSize
long getMaxHeapSize()Get the max heap size- Returns:
- map heap size
-
getCommittedVirtuallMemory
long getCommittedVirtuallMemory()Get the committed virtual memory- Returns:
- committed virtual memory
-
readConfig
Method to read xml config file.. -
writeConfig
Method to write xml config file.. -
getClientIdGeneratorTimeout
long getClientIdGeneratorTimeout()Get the client ID generator timeout- Returns:
- client ID generator timeout
-
getClientIdGeneratorRecycleSize
int getClientIdGeneratorRecycleSize()Get the client ID generator recycle size- Returns:
- client ID generator recycle size
-
getClientIdGeneratorRecycleDelaySize
int getClientIdGeneratorRecycleDelaySize()Get the client ID generator recycle delay size- Returns:
- client ID generator recycle delay size
-
getCommandInterfaceCommandHandler
com.wowza.wms.server.CommandInterfaceCommandHandler getCommandInterfaceCommandHandler()Get the command interface command handler- Returns:
- command interface command handler
-
getProtocolUsageTracker
com.wowza.wms.server.Server.ProtocolUsageSessionTracker getProtocolUsageTracker()Get the server level protocol usage tracker- Returns:
- server level protocol usage tracker
-
isAcceptWOWZConnections
boolean isAcceptWOWZConnections()If true, WOWZ connections will use the WOWZ protocol. If false, WOWZ connection attempts will fall back to RTMP.- Returns:
- true, WOWZ connections will use the WOWZ protocol
-
setAcceptWOWZConnections
void setAcceptWOWZConnections(boolean acceptWOWZConnections) If true, WOWZ connections will use the WOWZ protocol. If false, WOWZ connection attempts will fall back to RTMP.- Parameters:
acceptWOWZConnections
- true, WOWZ connections will use the WOWZ protocol
-
isInitiateWOWZConnections
boolean isInitiateWOWZConnections()If true, NetConnection attempts will use the WOWZ protocol when possible.- Returns:
- true, NetConnection attempts will use the WOWZ protocol when possible.
-
setInitiateWOWZConnections
void setInitiateWOWZConnections(boolean initiateWOWZConnections) If true, NetConnection attempts will use the WOWZ protocol when possible.- Parameters:
initiateWOWZConnections
- true, NetConnection attempts will use the WOWZ protocol when possible.
-
getLiveStreamTranscoderSessionCount
long getLiveStreamTranscoderSessionCount()Get the current number of live stream transcoder sessions.- Returns:
- current number of live stream transcoder sessions
-
getTuningHandler
com.wowza.wms.server.ServerTuningHandler getTuningHandler()Get the handler that control automatic server tuning- Returns:
- handler that control automatic server tuning
-
getTranscoderLicenseInUse
long getTranscoderLicenseInUse()Get the total number of transcoder licenses in use.- Returns:
- total number of transcoder licenses in use.
-
getTranscoderLicenseTotal
long getTranscoderLicenseTotal()Get the total number of transcoder licenses (-1 means unlimited - subscription)- Returns:
- total number of transcoder licenses
-
isTranscoderWatermark
boolean isTranscoderWatermark()Return true if transcoder has a watermark- Returns:
- true if transcoder has a watermark
-
isDVRAvailable
boolean isDVRAvailable()Returns true if nDVR is properly licensed.- Returns:
- true if nDVR is properly licensed
-
isDVRInUse
boolean isDVRInUse()Returns true if nDVR is in-use.- Returns:
- true if nDVR is in-use
-
isDRMAvailable
boolean isDRMAvailable()Returns true if DRM is properly licensed.- Returns:
- true if DRM is properly licensed
-
isDRMInUse
boolean isDRMInUse()Returns true if DRM is in-use.- Returns:
- true if DRM is in-use
-
isHTTPOriginAvailable
boolean isHTTPOriginAvailable()Returns true if HTTP origin is properly licensed.- Returns:
- true if HTTP origin is properly licensed
-
isRESTAPIAvailable
boolean isRESTAPIAvailable()Returns true if REST API is properly licensed.- Returns:
- true if REST API is properly licensed
-
isPushPublishAvailable
boolean isPushPublishAvailable()Returns true if Push Publish is properly licensed.- Returns:
- true if Push Publish is properly licensed.
-
setRestServerEnabled
void setRestServerEnabled(boolean restServerEnabled) Sets if REST API server will be enabled- Parameters:
restServerEnabled
- if the REST API server will be enabled
-
isRestServerEnabled
boolean isRestServerEnabled()Returns true if REST API is enabled- Returns:
- true if REST API is enabled
-
setRestDocumentationServerEnabled
void setRestDocumentationServerEnabled(boolean restDocumentationServerEnabled) Sets if REST API documentation server will be enabled- Parameters:
restDocumentationServerEnabled
- if the REST API server will be enabled
-
isRestDocumentationServerEnabled
boolean isRestDocumentationServerEnabled()Returns true if REST API documentation server is enabled- Returns:
- true if REST API documentation server is enabled
-
addAuthorizedRESTAPI
Returns true if the class has been added to the REST API.- Returns:
- true if the class has been added to the REST API
-
addUnAuthorizedRESTAPI
Returns true if the class has been added to the REST API at the specified URL- Returns:
- true if the class has been added to the REST API at the specified URL
-
addUnAuthorizedRESTAPI
Returns true if the class has been added to the REST API.- Returns:
- true if the class has been added to the REST API
-
addAuthorizedRESTAPI
Returns true if the class has been added to the REST API at the specified URL- Returns:
- true if the class has been added to the REST API at the specified URL
-
getConnectionsMaximum
long getConnectionsMaximum()Returns maximum number of connections allowed to the server (-1 means unlimited)- Returns:
- maximum number of connections allowed to the server (-1 means unlimited)
-
startStats
void startStats()Starts the statistics manager to collect server and application statistics -
stopStats
void stopStats()Stops the statistics manager -
getDefaultStreamPrefix
String getDefaultStreamPrefix()Get the default stream prefix used if the stream name does not include a prefix (default is mp4)- Returns:
- default stream prefix
-
setDefaultStreamPrefix
Set the default stream prefix used if the stream name does not include a prefix (default is mp4)- Parameters:
defaultStreamPrefix
- default stream prefix
-
getRTMPTHeaderServer
String getRTMPTHeaderServer()Get the Server header used for RTMPT responses- Returns:
- Server header used for RTMPT responses
-
setRTMPTHeaderServer
Set the Server header used for RTMPT responses- Parameters:
rtmptHeaderServer
- Server header used for RTMPT responses
-
getHTTPHeaderServer
String getHTTPHeaderServer()Get the Server header used for HTTP responses- Returns:
- the Server header used for HTTP responses
-
setHTTPHeaderServer
Set the Server header used for HTTP responses- Parameters:
httpHeaderServer
-
-
isLoggingRemoveStdoutIfRunningAsService
boolean isLoggingRemoveStdoutIfRunningAsService()If true, stdout log4j appender is removed from logging configuration if running as a service.- Returns:
- stdout log4j appender is removed from logging configuration if running as a service
-
setLoggingRemoveStdoutIfRunningAsService
void setLoggingRemoveStdoutIfRunningAsService(boolean loggingRemoveStdoutIfRunningAsService) If true, stdout log4j appender is removed from logging configuration if running as a service.- Parameters:
loggingRemoveStdoutIfRunningAsService
- stdout log4j appender is removed from logging configuration if running as a service
-
getTranscoderUsageTracker
com.wowza.wms.server.TranscoderUsageTracker getTranscoderUsageTracker()Get the server level live transcoder usage tracker- Returns:
- server level live transcoder usage tracker
-
getTranscoderVODUsageTracker
com.wowza.wms.transcoder.vod.TranscoderVODUsageTracker getTranscoderVODUsageTracker()Get the server level VOD transcoder usage tracker- Returns:
- server level VOD transcoder usage tracker
-
getThumbnailerUsageTracker
com.wowza.wms.transcoder.thumbnailer.ThumbnailerUsageTracker getThumbnailerUsageTracker()Get the server level thumbnail usage tracker- Returns:
- server level thumbnail usage tracker
-
getRESTUsageTracker
com.wowza.wms.rest.restserver.RESTUsageTracker getRESTUsageTracker()Get the server level REST usage tracker- Returns:
- server level REST usage tracker
-
getTranscoderContextServer
com.wowza.wms.transcoder.model.TranscoderContextServer getTranscoderContextServer()Get the server level transcoder context- Returns:
- server level transcoder context
-
getTranscoderCaptureManager
com.wowza.wms.transcoder.capture.TranscoderCaptureManager getTranscoderCaptureManager()Get the transcoder capture manager- Returns:
- transcoder capture manager
-
getPushPublishUsageTracker
PushPublishUsageTracker getPushPublishUsageTracker()Get the server level push publishing usage tracker- Returns:
- server level push publishing usage tracker
-
addLogListener
Add a log event listener- Parameters:
logListener
- log event listener
-
removeLogListener
Remove a log event listener- Parameters:
logListener
- log event listener- Returns:
- true if removed
-
getLogListeners
List<ILogNotify> getLogListeners()Get a copy of the log event listener list- Returns:
- log event listeners including the logNotifier object if specified
-