Package com.wowza.wms.vhost
Class VHostSingleton
Object
com.wowza.wms.vhost.VHostSingleton
VHostSingleton: singleton that provide access to running vHosts.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddVHostListener(IVHostNotify vhostListener) Add a vHost listener.static IVHostgetInstance(String vhostName) Get vHost by name.static IVHostgetInstance(String vhostName, boolean doCreate) Get vHost by name.static ListGet a list of vHost names.static voidInitialize vhost by name.static voidnotifyVHostClientConnect(IVHost vhost, IClient inClient, com.wowza.wms.request.RequestFunction function, AMFDataList params) Notify vhost client connectstatic voidnotifyVHostCreate(IVHost vhost) Notify vHost listener of create.static voidnotifyVHostInit(IVHost vhost) Notify vHost listener of ini.static voidNotify vHost listener of destruction.static voidnotifyVHostShutdownStart(IVHost vhost) Notify vHost listener of destruction.static voidRemove a vHost from list of running vHosts.static voidremoveApplicationListener(IVHostNotify vhostListener) Remove vHost listenerstatic voidSet a reference to the current running server.static voidShutdown a vHost by name.
-
Constructor Details
-
VHostSingleton
public VHostSingleton()
-
-
Method Details
-
getInstance
Get vHost by name. Do NOT create if does not exist.- Parameters:
vhostName- vHost name- Returns:
- vHost
-
getInstance
Get vHost by name. Create if does not exist.- Parameters:
vhostName- vhost namedoCreate- if true, create if does not exist- Returns:
- vHost
-
init
Initialize vhost by name.- Parameters:
vhostName- vHost nameconfigHome- configuration path, path to VHost.xml
-
setServer
Set a reference to the current running server.- Parameters:
server- server
-
shutdown
Shutdown a vHost by name.- Parameters:
vhostName- vhost name
-
getVHostNames
Get a list of vHost names. Return copy of list.- Returns:
- vHost names
-
remove
Remove a vHost from list of running vHosts.- Parameters:
vhostName- vhost name
-
addVHostListener
Add a vHost listener. A vHost listener receives the following events: onVHostCreate, onVHostInit, onVHostDestroy- Parameters:
vhostListener- vHost listener
-
removeApplicationListener
Remove vHost listener- Parameters:
vhostListener- vHost listener
-
notifyVHostClientConnect
public static void notifyVHostClientConnect(IVHost vhost, IClient inClient, com.wowza.wms.request.RequestFunction function, AMFDataList params) Notify vhost client connect- Parameters:
vhost- vHostinClient- clientfunction- functionparams- parameters
-
notifyVHostCreate
Notify vHost listener of create.- Parameters:
vhost- vHost
-
notifyVHostInit
Notify vHost listener of ini.- Parameters:
vhost- vHost
-
notifyVHostShutdownStart
Notify vHost listener of destruction.- Parameters:
vhost- vHost
-
notifyVHostShutdownComplete
Notify vHost listener of destruction.- Parameters:
vhost- vHost
-