Package com.wowza.wms.application
Interface IApplication
public interface IApplication
IApplication: public interface to Application object
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
addApplicationInstanceListener
(IApplicationInstanceNotify applicationInstanceListener) Add applicationInstance listener.addIOPerformance
(int counterIndex, IOPerformanceCounter totalIOPerformanceResult) addIOPerformance
(IOPerformanceCounter totalIOPerformanceResult) getAppInstance
(String name) Get applicationInstance object by name.getAppInstance
(String name, boolean doLoad) Get applicationInstance object by name and optionally load it if it was not already loaded.Get a list of application instance namesGet the root path for applicationGet full path to Application.xml fileGet the connectionCounter for applicationcom.wowza.wms.client.ConnectionCounterSimple
getConnectionCounter
(int counterIndex) Get the connectionCounter for application for application for a specific technology (see IVHost.COUNTER_*)Get date application startedint
Get the performance counter for applicationgetIoPerformanceCounter
(int counterIndex) Get the performance counter for application for a specific technology (see IVHost.COUNTER_*)getName()
Get the name of applicationGet application propertiesvoid
getProtocolUsage
(boolean[] protocolsInUse) Get the protocols in use by this application instance (see IApplicationInstance.PROTCOLUSAGE_*)Get time application runningdouble
Get time running in secondsgetVHost()
Get the parent vHost objectboolean
isAppInstanceLoaded
(String name) Return true if application instance is loadedboolean
Returns true if the application is in running statereadAppConfig
(String sName) Method to read xml config file..void
removeAppInstance
(IApplicationInstance appInstance) Disconnect all clients connected to an application instance and remove it from the IApplication application list.void
removeApplicationInstanceListener
(IApplicationInstanceNotify applicationInstanceListener) Remove applicationInstance listener.void
Set name of applicationvoid
void
shutdown
(boolean isServerShutdown) shutdown applicationvoid
shutdownAppInstance
(String appInstanceName) Shutdown an application instance by name.boolean
writeAppConfig
(String sName, String data) Method to write xml config file..
-
Field Details
-
DEFAULT_APPLICATION_NAME
- See Also:
-
-
Method Details
-
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
Get applicationInstance object by name. Loads application instance if it was not already loaded.- Parameters:
name
- applicationInstance name- Returns:
- appliationInstance object
-
getAppInstance
Get applicationInstance object by name and optionally load it if it was not already loaded.- Parameters:
name
- applicationInstance namedoLoad
- when true, will load application instance if it was not already loaded.- Returns:
- appliationInstance object
-
isAppInstanceLoaded
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
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
Add applicationInstance listener. Will be invoked each time applicationInstance created/deleted- Parameters:
applicationInstanceListener
- applicationInstance listener
-
removeApplicationInstanceListener
Remove applicationInstance listener. Will be invoked each time applicationInstance created/deleted- Parameters:
applicationInstanceListener
- applicationInstance listener
-
updateIOPerformance
IOPerformanceCounter updateIOPerformance() -
addIOPerformance
-
addIOPerformance
IOPerformanceCounter addIOPerformance(int counterIndex, IOPerformanceCounter totalIOPerformanceResult) -
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
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
Get a list of application instance names- Returns:
- list of application instance names
-
removeAppInstance
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
Shutdown an application instance by name. This will disconnect all clients connected to this application instance.- Parameters:
appInstanceName
- application instance name
-
readAppConfig
Method to read xml config file.. -
writeAppConfig
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
-