Interface IApplication


  • public interface IApplication

    IApplication: public interface to Application object

    • Field Detail

    • Method Detail

      • shutdown

        void shutdown​(boolean isServerShutdown)
        shutdown application
        Parameters:
        isServerShutdown - true if due to shutdown of server
      • getApplicationPath

        String getApplicationPath()
        Get the root path for application
        Returns:
        root path for application
      • getConfigPath

        String getConfigPath()
        Get full path to Application.xml file
        Returns:
        full path to Application.xml file
      • getAppInstance

        IApplicationInstance getAppInstance​(String name)
        Get applicationInstance object by name. Loads application instance if it was not already loaded.
        Parameters:
        name - applicationInstance name
        Returns:
        appliationInstance object
      • getAppInstance

        IApplicationInstance getAppInstance​(String name,
                                            boolean doLoad)
        Get applicationInstance object by name and optionally load it if it was not already loaded.
        Parameters:
        name - applicationInstance name
        doLoad - when true, will load application instance if it was not already loaded.
        Returns:
        appliationInstance object
      • isAppInstanceLoaded

        boolean isAppInstanceLoaded​(String name)
        Return true if application instance is loaded
        Parameters:
        name - applicationInstance name
        Returns:
        true if application instance is loaded
      • getName

        String getName()
        Get the name of application
        Returns:
        name of application
      • setName

        void setName​(String name)
        Set name of application
        Parameters:
        name - name of application
      • getVHost

        IVHost getVHost()
        Get the parent vHost object
        Returns:
        parent vHost
      • getProperties

        WMSProperties getProperties()
        Get application properties
        Returns:
        application properties
      • addApplicationInstanceListener

        void addApplicationInstanceListener​(IApplicationInstanceNotify applicationInstanceListener)
        Add applicationInstance listener. Will be invoked each time applicationInstance created/deleted
        Parameters:
        applicationInstanceListener - applicationInstance listener
      • removeApplicationInstanceListener

        void removeApplicationInstanceListener​(IApplicationInstanceNotify applicationInstanceListener)
        Remove applicationInstance listener. Will be invoked each time applicationInstance created/deleted
        Parameters:
        applicationInstanceListener - applicationInstance listener
      • getConnectionCounter

        ConnectionCounter getConnectionCounter()
        Get the connectionCounter for application
        Returns:
        connectionCounter for application
      • getConnectionCounter

        com.wowza.wms.client.ConnectionCounterSimple getConnectionCounter​(int counterIndex)
        Get the connectionCounter for application for application for a specific technology (see IVHost.COUNTER_*)
        Parameters:
        counterIndex - counter index (see IVHost.COUNTER_*)
        Returns:
        connection ocunter
      • getIoPerformanceCounter

        IOPerformanceCounter getIoPerformanceCounter()
        Get the performance counter for application
        Returns:
        performance counter for application
      • getIoPerformanceCounter

        IOPerformanceCounter getIoPerformanceCounter​(int counterIndex)
        Get the performance counter for application for a specific technology (see IVHost.COUNTER_*)
        Parameters:
        counterIndex - counter index (see IVHost.COUNTER_*)
        Returns:
        performance counter
      • getDateStarted

        String getDateStarted()
        Get date application started
        Returns:
        date application started
      • getTimeRunning

        String getTimeRunning()
        Get time application running
        Returns:
        time application running
      • getTimeRunningSeconds

        double getTimeRunningSeconds()
        Get time running in seconds
        Returns:
        time running in seconds
      • getInstanceCount

        int getInstanceCount()
      • getAppInstanceNames

        java.util.List<String> getAppInstanceNames()
        Get a list of application instance names
        Returns:
        list of application instance names
      • removeAppInstance

        void removeAppInstance​(IApplicationInstance appInstance)
        Disconnect all clients connected to an application instance and remove it from the IApplication application list. The proper way to call this is:
        public void shutdownAppInstance(IApplicationInstance appInstance)
        {
                IVHost vhost = appInstance.getVHost();
                IApplication app = appInstance.getApplication();
        
                WMSReadWriteLock appLock = vhost.getApplicationLock();
                appLock.writeLock().lock();
                try
                {
                        app.removeAppInstance(appInstance);
                }
                catch (Exception e)
                {
                        WMSLoggerFactory.getLogger(Application.class).error("Application.shutdownAppInstance ", e);
                }
                finally
                {
                        appLock.writeLock().unlock();
                }
        }
        
        Parameters:
        appInstance - application instance to remove
      • shutdownAppInstance

        void shutdownAppInstance​(String appInstanceName)
        Shutdown an application instance by name. This will disconnect all clients connected to this application instance.
        Parameters:
        appInstanceName - application instance name
      • readAppConfig

        String readAppConfig​(String sName)
        Method to read xml config file..
      • writeAppConfig

        boolean writeAppConfig​(String sName,
                               String data)
        Method to write xml config file..
      • getProtocolUsage

        void getProtocolUsage​(boolean[] protocolsInUse)
        Get the protocols in use by this application instance (see IApplicationInstance.PROTCOLUSAGE_*)
      • setRunningToFalse

        void setRunningToFalse()
      • isRunning

        boolean isRunning()
        Returns true if the application is in running state
        Returns:
        true if the application is in running state