com.wowza.wms.vhost
Class VHostList

Object
  extended by com.wowza.wms.vhost.VHostList

public class VHostList
extends Object

VHostList: list of VHost items. Result of parsing VHosts.xml at server startup or VHosts.xml reload. This interface can keep track of reloads and carefully mark items for deletion.


Constructor Summary
VHostList()
          Create empty vHostList
 
Method Summary
 void addVHostItemListener(IVHostItemNotify vHostItemListener)
          Add vHostItem listener.
 java.util.List<VHostItem> getVHostItems()
          Get a list of vHostItems.
 java.util.Map<String,VHostItem> getVHostMap()
          Get the Map of vHostItem defintions.
 java.util.List<String> getVHostNames()
          Get a list of vHost names.
 void loadConfig()
           
 void notifyVHostItemCreate(VHostItem vhostItem)
          Notify vHostItem listener of item create.
 void notifyVHostItemDestroy(VHostItem vhostItem)
          Notify vHostItem listener of item destroy.
 void notifyVHostItemUpdate(VHostItem vhostItem)
          Notify vHostItem listener of item update.
 void reloadConfig()
          Reload VHosts.xml file.
 void removeVHostItemListener(IVHostItemNotify vHostItemListener)
          Remove vHostItem listener.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VHostList

public VHostList()
Create empty vHostList

Method Detail

addVHostItemListener

public void addVHostItemListener(IVHostItemNotify vHostItemListener)
Add vHostItem listener. vHostItem listeners will receive the following events: onVHostItemCreate, onVHostItemUpdate, onVHostItemDestroy.

Parameters:
vHostItemListener - vHostItem listener

getVHostItems

public java.util.List<VHostItem> getVHostItems()
Get a list of vHostItems. Create a shallow copy of list.

Returns:
list of vHostItems

getVHostMap

public java.util.Map<String,VHostItem> getVHostMap()
Get the Map of vHostItem defintions.

Returns:
Map of vHostItem defintions

getVHostNames

public java.util.List<String> getVHostNames()
Get a list of vHost names. Creates a copy of list.

Returns:
list of vHost names

loadConfig

public void loadConfig()

notifyVHostItemCreate

public void notifyVHostItemCreate(VHostItem vhostItem)
Notify vHostItem listener of item create.

Parameters:
vhostItem - vHostItem

notifyVHostItemDestroy

public void notifyVHostItemDestroy(VHostItem vhostItem)
Notify vHostItem listener of item destroy.

Parameters:
vhostItem - vHostItem

notifyVHostItemUpdate

public void notifyVHostItemUpdate(VHostItem vhostItem)
Notify vHostItem listener of item update.

Parameters:
vhostItem - vHostItem

reloadConfig

public void reloadConfig()
Reload VHosts.xml file.


removeVHostItemListener

public void removeVHostItemListener(IVHostItemNotify vHostItemListener)
Remove vHostItem listener.

Parameters:
vHostItemListener - vHostItem listener