Package com.wowza.wms.sharedobject
Interface ISharedObjects
- 
 public interface ISharedObjectsISharedObjects: public interface to SharedObjects. Represent the list of shared objects managed by IApplicationInstance. 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddSharedObjectListener(ISharedObjectNotify sharedObjectListener)Add a shared object listener.voiddisconnect(IClient client)Disconnect client from all shared objects in list.booleanexists(ISharedObject sharedObject)Is sharedObject in this list (by shared object reference).booleanexists(String objectName)Is sharedObject in this list (by name).voidflush()Flush all persistent shared objects to disk.ISharedObjectget(String name)Get shared object by name.java.util.List<String>getObjectNames()Get a list of shared object names.ISharedObjectgetOrCreate(String name)Get shared object by name if it does not exist create a new shared object with the given name.StringgetStorageDir()Get the storage directory for all shared objects in list.booleanisPersistent()Are shared objects in list persistent.voidload()Load persistent shared objects from file system.voidput(String objectName, ISharedObject sharedObject)Add or replace a shared object.voidremove(String objectName)Remove a shared object.voidremoveClient(IClient client)Remove a client from any shared object that it is connected to in this list.voidremoveSharedObjectListener(ISharedObjectNotify sharedObjectListener)Remove a shared object listener.voidsetPersistent(boolean isPersistent)Set is shared object in list persistentvoidsetStorageDir(String storageDir)Set the storage directory for all shared objects in list.intsize()Get number of shared objects.
 
- 
- 
- 
Method Detail- 
sizeint size() Get number of shared objects.- Returns:
- number of shared objects
 
 - 
getISharedObject get(String name) Get shared object by name. If the shared object does not exist null will be returned. (see ISharedObjects.getOrCreate)- Parameters:
- name- shared object name
- Returns:
- shared object
 
 - 
getOrCreateISharedObject getOrCreate(String name) Get shared object by name if it does not exist create a new shared object with the given name.- Parameters:
- name- shared object name
- Returns:
- shared object
 
 - 
getObjectNamesjava.util.List<String> getObjectNames() Get a list of shared object names.- Returns:
- list of shared object names
 
 - 
putvoid put(String objectName, ISharedObject sharedObject)Add or replace a shared object.- Parameters:
- objectName- shared object name
- sharedObject- shared object
 
 - 
removevoid remove(String objectName) Remove a shared object.- Parameters:
- objectName- shared object name
 
 - 
existsboolean exists(String objectName) Is sharedObject in this list (by name).- Parameters:
- objectName- shared object name
- Returns:
- true if shared object in list
 
 - 
existsboolean exists(ISharedObject sharedObject) Is sharedObject in this list (by shared object reference).- Parameters:
- sharedObject- shared object
- Returns:
- true if shared object in list
 
 - 
isPersistentboolean isPersistent() Are shared objects in list persistent.- Returns:
- true is shared objects in list are persistent
 
 - 
setPersistentvoid setPersistent(boolean isPersistent) Set is shared object in list persistent- Parameters:
- isPersistent- true is shared objects in list are persistent
 
 - 
removeClientvoid removeClient(IClient client) Remove a client from any shared object that it is connected to in this list.- Parameters:
- client- client
 
 - 
flushvoid flush() Flush all persistent shared objects to disk.
 - 
disconnectvoid disconnect(IClient client) Disconnect client from all shared objects in list.- Parameters:
- client- client
 
 - 
addSharedObjectListenervoid addSharedObjectListener(ISharedObjectNotify sharedObjectListener) Add a shared object listener. The listener will receive the following events: onSharedObjectCreate, onSharedObjectDestroy, onSharedObjectConnect, onSharedObjectDisconnect.- Parameters:
- sharedObjectListener-
 
 - 
removeSharedObjectListenervoid removeSharedObjectListener(ISharedObjectNotify sharedObjectListener) Remove a shared object listener.- Parameters:
- sharedObjectListener-
 
 - 
getStorageDirString getStorageDir() Get the storage directory for all shared objects in list.- Returns:
- storage dir
 
 - 
setStorageDirvoid setStorageDir(String storageDir) Set the storage directory for all shared objects in list.- Parameters:
- storageDir-
 
 - 
loadvoid load() Load persistent shared objects from file system.
 
- 
 
-