|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Objectcom.wowza.wms.sharedobject.SharedObject
public class SharedObject
| Field Summary | |
|---|---|
static int |
READACCESS
|
static int |
WRITEACCESS
|
| Fields inherited from interface com.wowza.wms.sharedobject.ISharedObject |
|---|
FILEEXTENSION, SHAREDOBJECT_CMD_CONNECT, SHAREDOBJECT_CMD_CONNECTSUCCESS, SHAREDOBJECT_CMD_DELETE, SHAREDOBJECT_CMD_DISCONNECT, SHAREDOBJECT_CMD_ERROR, SHAREDOBJECT_CMD_SEND, SHAREDOBJECT_CMD_SETVALUE, SHAREDOBJECT_STATUS_CHANGE, SHAREDOBJECT_STATUS_CLEAR, SHAREDOBJECT_STATUS_DELETE, SHAREDOBJECT_STATUS_SUCCESS |
| Constructor Summary | |
|---|---|
SharedObject(String name)
Create new shared object |
|
SharedObject(String name,
boolean isPersistent,
String storageDir)
Create new shared object |
|
| Method Summary | |
|---|---|
void |
acquire()
Increment the reference count to this shared object. |
void |
addClient(IClient client)
Add a client to this shared object. |
void |
addSlotListener(ISharedObjectSlotNotify slotListener)
Add a slot listener. |
void |
clear()
Clear all properties from a shared object |
void |
close()
Force close this shared object (not implemented) |
boolean |
containsProperty(String slotName)
Returns true is slot/property name exists |
boolean |
containsSlot(String slotName)
Returns true is slot/property name exists |
void |
deleteSlot(IClient client,
String slotName)
Remove a slot (property) |
void |
deleteSlot(String slotName)
Remove slot (property) |
void |
disconnect(IClient client)
Disconnect client from shared object. |
void |
flush()
Flush (write to disk) shared object |
static boolean[] |
getAccess(IClient client,
String soName)
|
java.util.List<com.wowza.wms.sharedobject.SharedObjectClient> |
getClients()
Get a list of client that are connected to this shared object. |
void |
getClientUpdates(IClient client)
|
String |
getName()
Get shared object name |
ISharedObjects |
getParent()
Get the shared object container to which this shared object belongs. |
AMFData |
getProperty(String slotName)
Get slot (property) value. |
int |
getRefCount()
Get the current reference (clients) connected to this shared object. |
ISharedObjectSlot |
getSlot(String name)
Get ISharedObjectSlot interface to a slot (property) by name |
java.util.List<String> |
getSlotNames()
Get a list of slot (property) names |
java.util.List<ISharedObjectSlot> |
getSlots()
Get a list of active slots |
String |
getStorageDir()
Get path used to store shared object. |
int |
getVersion()
Get the internval version number. |
boolean |
isClient(IClient client)
Is this client connected to shared object |
boolean |
isPersistent()
Is this shared object being persisted. |
void |
load()
|
void |
lock()
Lock a shared object for write access |
void |
notifySlotDelete(ISharedObjectSlot slot)
|
void |
notifySlotSetValue(ISharedObjectSlot slot)
|
int |
purge(int version)
Purge all deleted properties older than the version number |
void |
putSlot(String name,
ISharedObjectSlot slot)
Add a new slot (property) to a shared object. |
void |
release()
Descrement the reference count to this shared object. |
void |
removeClient(IClient client)
Remove a client from this shared object. |
void |
removeSlotListener(ISharedObjectSlotNotify slotListener)
Remove slot listener |
void |
send(String handlerName)
Call client side handler attached to shared object (no parameters). |
void |
send(String handlerName,
Object... params)
Call client side handler attached to shared object. |
void |
sendInternal(IClient client,
String handlerName,
byte[] msgBytes)
|
void |
sendInternal(IClient client,
String handlerName,
byte[] msgBytes,
AMFDataContextDeserialize context)
|
void |
sendInternal(String handlerName,
AMFData[] params)
|
void |
setName(String name)
Set shared object name |
void |
setParent(ISharedObjects parent)
|
void |
setPersistent(boolean isPersistent)
Set is shared object persisted. |
void |
setProperty(String slotName,
AMFData data)
Set slot (property) value as AMFData object. |
void |
setProperty(String slotName,
boolean value)
Set slot (property) value as a boolean value (will be wrapped in an AMFDataItem object) |
void |
setProperty(String slotName,
java.util.Date value)
Set slot (property) value as a date value (will be wrapped in an AMFDataItem object) |
void |
setProperty(String slotName,
double value)
Set slot (property) value as a double value (will be wrapped in an AMFDataItem object) |
void |
setProperty(String slotName,
int value)
Set slot (property) value as a int value (will be wrapped in an AMFDataItem object) |
void |
setProperty(String slotName,
long value)
Set slot (property) value as a long value (will be wrapped in an AMFDataItem object) |
void |
setProperty(String slotName,
String value)
Set slot (property) value as a string value (will be wrapped in an AMFDataItem object) |
void |
setSlotValue(IClient client,
String slotName,
AMFData amfData)
|
void |
setSlotValue(IClient client,
String slotName,
byte[] byteData)
|
void |
setSlotValue(IClient client,
String slotName,
byte[] byteData,
AMFData amfData)
|
void |
setSlotValue(IClient client,
String slotName,
byte[] byteData,
AMFData amfData,
AMFDataContextDeserialize context)
|
void |
setSlotValue(IClient client,
String slotName,
byte[] byteData,
AMFDataContextDeserialize context)
|
void |
setStorageDir(String storageDir)
Set path used to store shared object. |
void |
setVersion(int version)
Set the internal version number. |
int |
size()
Get the number of active slot (properties). |
void |
unlock()
Unlock a shared object for write access |
void |
writeDeleteError(IClient client,
String soName,
boolean isPersistent,
String slotName,
String errorMsg)
Write an delete error message back to the client |
static void |
writeError(IClient client,
String soName,
boolean isPersistent,
String errorMsg,
boolean isConnect)
|
void |
writeSetValueError(IClient client,
String soName,
boolean isPersistent,
String slotName,
String errorMsg)
Write an set value error message back to the client |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int READACCESS
public static final int WRITEACCESS
| Constructor Detail |
|---|
public SharedObject(String name)
name - shared object name
public SharedObject(String name,
boolean isPersistent,
String storageDir)
name - shared object nameisPersistent - is persistentstorageDir - storage directory for persistent shared object| Method Detail |
|---|
public void acquire()
ISharedObject
acquire in interface ISharedObjectpublic void addClient(IClient client)
ISharedObject
addClient in interface ISharedObjectclient - clientpublic void addSlotListener(ISharedObjectSlotNotify slotListener)
ISharedObject
addSlotListener in interface ISharedObjectslotListener - slot listenerpublic void clear()
ISharedObject
clear in interface ISharedObjectpublic void close()
ISharedObject
close in interface ISharedObjectpublic boolean containsProperty(String slotName)
ISharedObject
containsProperty in interface ISharedObjectslotName - slot/property name
public boolean containsSlot(String slotName)
ISharedObject
containsSlot in interface ISharedObjectslotName - slot/property name
public void deleteSlot(IClient client,
String slotName)
ISharedObject
deleteSlot in interface ISharedObjectclient - client removing slot or null if server side codeslotName - slot (property) namepublic void deleteSlot(String slotName)
ISharedObject
deleteSlot in interface ISharedObjectslotName - slot (property) namepublic void disconnect(IClient client)
ISharedObject
disconnect in interface ISharedObjectclient - client to disconnectpublic void flush()
ISharedObject
flush in interface ISharedObject
public static boolean[] getAccess(IClient client,
String soName)
public java.util.List<com.wowza.wms.sharedobject.SharedObjectClient> getClients()
ISharedObject
getClients in interface ISharedObjectpublic void getClientUpdates(IClient client)
public String getName()
ISharedObject
getName in interface ISharedObjectpublic ISharedObjects getParent()
ISharedObject
getParent in interface ISharedObjectpublic AMFData getProperty(String slotName)
ISharedObject
getProperty in interface ISharedObjectslotName - slot (property) name
public int getRefCount()
ISharedObject
getRefCount in interface ISharedObjectpublic ISharedObjectSlot getSlot(String name)
ISharedObject
getSlot in interface ISharedObjectname - slot (property) name
public java.util.List<String> getSlotNames()
ISharedObject
getSlotNames in interface ISharedObjectpublic java.util.List<ISharedObjectSlot> getSlots()
ISharedObject
getSlots in interface ISharedObjectpublic String getStorageDir()
ISharedObject
getStorageDir in interface ISharedObjectpublic int getVersion()
ISharedObject
getVersion in interface ISharedObjectpublic boolean isClient(IClient client)
ISharedObject
isClient in interface ISharedObjectclient - client
public boolean isPersistent()
ISharedObject
isPersistent in interface ISharedObjectpublic void load()
public void lock()
ISharedObject
lock in interface ISharedObjectpublic void notifySlotDelete(ISharedObjectSlot slot)
public void notifySlotSetValue(ISharedObjectSlot slot)
public int purge(int version)
ISharedObject
purge in interface ISharedObject
public void putSlot(String name,
ISharedObjectSlot slot)
ISharedObject
putSlot in interface ISharedObjectname - slot (property) nameslot - new slotpublic void release()
ISharedObject
release in interface ISharedObjectpublic void removeClient(IClient client)
ISharedObject
removeClient in interface ISharedObjectclient - clientpublic void removeSlotListener(ISharedObjectSlotNotify slotListener)
ISharedObject
removeSlotListener in interface ISharedObjectslotListener - slot listenerpublic void send(String handlerName)
ISharedObject
send in interface ISharedObjecthandlerName - handler name
public void send(String handlerName,
Object... params)
ISharedObject
send in interface ISharedObjecthandlerName - handler nameparams - variable argument list of parameters
public void sendInternal(IClient client,
String handlerName,
byte[] msgBytes)
public void sendInternal(IClient client,
String handlerName,
byte[] msgBytes,
AMFDataContextDeserialize context)
public void sendInternal(String handlerName,
AMFData[] params)
public void setName(String name)
ISharedObject
setName in interface ISharedObjectname - shared object namepublic void setParent(ISharedObjects parent)
public void setPersistent(boolean isPersistent)
ISharedObject
setPersistent in interface ISharedObjectisPersistent - true if shared object is being persisted
public void setProperty(String slotName,
AMFData data)
ISharedObject
setProperty in interface ISharedObjectslotName - slot (property) namedata - slot value as AMFData object. Example: new AMFDataItem((double)1.234) or new AMFDataItem()
public void setProperty(String slotName,
boolean value)
ISharedObject
setProperty in interface ISharedObjectslotName - slot (property) namevalue - boolean value
public void setProperty(String slotName,
java.util.Date value)
ISharedObject
setProperty in interface ISharedObjectslotName - slot (property) namevalue - date value
public void setProperty(String slotName,
double value)
ISharedObject
setProperty in interface ISharedObjectslotName - slot (property) namevalue - double value
public void setProperty(String slotName,
int value)
ISharedObject
setProperty in interface ISharedObjectslotName - slot (property) namevalue - int value
public void setProperty(String slotName,
long value)
ISharedObject
setProperty in interface ISharedObjectslotName - slot (property) namevalue - long value
public void setProperty(String slotName,
String value)
ISharedObject
setProperty in interface ISharedObjectslotName - slot (property) namevalue - string value
public void setSlotValue(IClient client,
String slotName,
AMFData amfData)
public void setSlotValue(IClient client,
String slotName,
byte[] byteData)
public void setSlotValue(IClient client,
String slotName,
byte[] byteData,
AMFData amfData)
public void setSlotValue(IClient client,
String slotName,
byte[] byteData,
AMFData amfData,
AMFDataContextDeserialize context)
public void setSlotValue(IClient client,
String slotName,
byte[] byteData,
AMFDataContextDeserialize context)
public void setStorageDir(String storageDir)
ISharedObject
setStorageDir in interface ISharedObjectstorageDir - path used to store shared objectpublic void setVersion(int version)
ISharedObject
setVersion in interface ISharedObjectversion - internal version numberpublic int size()
ISharedObject
size in interface ISharedObjectpublic void unlock()
ISharedObject
unlock in interface ISharedObject
public void writeDeleteError(IClient client,
String soName,
boolean isPersistent,
String slotName,
String errorMsg)
ISharedObject
writeDeleteError in interface ISharedObjectclient - client removing slot or null if server side codesoName - sharedObject nameisPersistent - is persistentslotName - slot nameerrorMsg - error message
public static void writeError(IClient client,
String soName,
boolean isPersistent,
String errorMsg,
boolean isConnect)
public void writeSetValueError(IClient client,
String soName,
boolean isPersistent,
String slotName,
String errorMsg)
ISharedObject
writeSetValueError in interface ISharedObjectclient - client removing slot or null if server side codesoName - sharedObject nameisPersistent - is persistentslotName - slot nameerrorMsg - error message
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||