Interface IServer


  • public interface IServer

    IServer: public interface to Server object.

    • Method Detail

      • 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

        void stopVHost​(String vhostName)
        Stop a vHost by name.
        Parameters:
        vhostName - vHost name
      • stopVHosts

        void stopVHosts()
        Stop all vHosts
      • isVHostRunning

        boolean isVHostRunning​(String name)
        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

        void startVHost​(String vhostName)
        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

        IOPerformanceCounter getIoPerformanceCounter​(int counterIndex)
        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

        void setCommandInterfaceHostPort​(HostPort commandInterfaceHostPort)
        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

        void setUserAgents​(String[] userAgents)
        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

        void addServerListener​(IServerNotify serverListener)
        Add server listener
        Parameters:
        serverListener - server listener
      • removeServerListener

        void removeServerListener​(IServerNotify serverListener)
        Remove server listener
        Parameters:
        serverListener - server listener
      • getAdminInterfaceObjectList

        java.util.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

        java.util.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

        void setDynamicLogProperties​(java.util.Properties dynamicLogProperties)
        Set the dynamic log properties set at the server level
        Parameters:
        dynamicLogProperties - dynamic log properties defined at the server level
      • isDynamicLogContextLoaded

        boolean isDynamicLogContextLoaded​(String logContext)
        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

        String readConfig​(String sName)
        Method to read xml config file..
      • writeConfig

        boolean writeConfig​(String sName,
                            String data)
        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

        boolean addAuthorizedRESTAPI​(Class classType)
        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

        boolean addUnAuthorizedRESTAPI​(Class classType,
                                       String url)
        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

        boolean addUnAuthorizedRESTAPI​(Class classType)
        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

        boolean addAuthorizedRESTAPI​(Class classType,
                                     String url)
        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

        void setDefaultStreamPrefix​(String defaultStreamPrefix)
        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

        void setRTMPTHeaderServer​(String rtmptHeaderServer)
        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

        void setHTTPHeaderServer​(String httpHeaderServer)
        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

        void addLogListener​(ILogNotify logListener)
        Add a log event listener
        Parameters:
        logListener - log event listener
      • removeLogListener

        boolean removeLogListener​(ILogNotify logListener)
        Remove a log event listener
        Parameters:
        logListener - log event listener
        Returns:
        true if removed
      • getLogListeners

        java.util.List<ILogNotify> getLogListeners()
        Get a copy of the log event listener list
        Returns:
        log event listeners including the logNotifier object if specified