use of org.red5.server.api.so.IClientSharedObject in project red5-client by Red5.
the class BaseRTMPClientHandler method getSharedObject.
/**
* Connect to client shared object.
*
* @param name
* Client shared object name
* @param persistent
* SO persistence flag
* @return Client shared object instance
*/
@Override
public IClientSharedObject getSharedObject(String name, boolean persistent) {
log.debug("getSharedObject name: {} persistent {}", new Object[] { name, persistent });
ClientSharedObject result = sharedObjects.get(name);
if (result != null) {
if (result.isPersistent() != persistent) {
throw new RuntimeException("Already connected to a shared object with this name, but with different persistence.");
}
return result;
}
result = new ClientSharedObject(name, persistent);
sharedObjects.put(name, result);
return result;
}
Aggregations