org.red5.server.api.so
public interface ISharedObjectBase extends ISharedObjectHandlerProvider, ICastingAttributeStore
SharedObject.beginUpdate();
SharedObject.setAttribute("One", '1');
SharedObject.setAttribute("Two", '2');
SharedObject.removeAttribute("Three");
SharedObject.endUpdate();
Modifier and Type | Method and Description |
---|---|
void |
addSharedObjectListener(ISharedObjectListener listener)
Register object that will be notified about update events.
|
void |
beginUpdate()
Start performing multiple updates to the shared object from serverside
code.
|
void |
beginUpdate(IEventListener source)
Start performing multiple updates to the shared object from a connected
client.
|
boolean |
clear()
Deletes all the attributes and sends a clear event to all listeners.
|
void |
close()
Detaches a reference from this shared object, this will destroy the
reference immediately.
|
void |
endUpdate()
The multiple updates are complete, notify clients about all changes at
once.
|
Map<String,Object> |
getData()
Return a map containing all attributes of the shared object.
|
int |
getVersion()
Returns the version of the shared object.
|
boolean |
isLocked()
Returns the locked state of this SharedObject.
|
boolean |
isPersistent()
Check if the object has been created as persistent shared object by the
client.
|
void |
lock()
Locks the shared object instance.
|
void |
removeSharedObjectListener(ISharedObjectListener listener)
Unregister object to not longer receive update events.
|
void |
sendMessage(String handler,
List<?> arguments)
Send a message to a handler of the shared object.
|
void |
unlock()
Unlocks a shared object instance that was locked with
SharedObject.lock().
|
registerServiceHandler, unregisterServiceHandler
getServiceHandler, getServiceHandlerNames, registerServiceHandler
getBoolAttribute, getByteAttribute, getDoubleAttribute, getIntAttribute, getListAttribute, getLongAttribute, getMapAttribute, getSetAttribute, getShortAttribute, getStringAttribute
getAttribute, getAttribute, getAttributeNames, getAttributes, hasAttribute, removeAttribute, removeAttributes, setAttribute, setAttributes, setAttributes
int getVersion()
boolean isPersistent()
Map<String,Object> getData()
void sendMessage(String handler, List<?> arguments)
handler
- the name of the handler to callarguments
- a list of objects that should be passed as arguments to the
handlervoid beginUpdate()
void beginUpdate(IEventListener source)
source
- Update events listenervoid endUpdate()
void addSharedObjectListener(ISharedObjectListener listener)
listener
- the object to notifyvoid removeSharedObjectListener(ISharedObjectListener listener)
listener
- the object to unregistervoid lock()
void unlock()
boolean isLocked()
boolean clear()
void close()
Copyright © 2006-2012 The Red5 Project