`
semi_sleep
  • 浏览: 101125 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

20090612 (Red5 Study 3)

阅读更多

Is context global or there may be one context for each scope or for each application?
There's a global context and one context for each application.


How to implement security checking?
First put user data in IClient/IConnection when first connect to server.
For method call, override IScopeHandler.serviceCall(IConnection, IServiceCall) or check at method entry point.
For streaming, implement IStreamPlaybackSecurity and IStreamPublishSecurity to check security.


MBean in Red5?


Why ApplicationAdapter's method can be called by client?


How those key components fixed together? (client, client registry, handler, scope, context, application adapter)


IAttributeStore a map to put/get attribute.


IEvent, IEventDispatcher, IEventHandler, IEventListener
Lots of RTMP package implements IEvent but the dispatcher, handler and listener do not have much usage, they can be ignored.


ICoreObject implements IAttributeStore and IEvent related interfaces.


IPersistenceStore, delegated storage for IPersistable, may be file or ram or other.
IPersistable, knows how to serialize and deserialize itself, also contains a path and name so that they can be identified.
It's not supposed to be implemented by other program because normally you can't retrieve a correct IPersistenceStore, unless hardcoded to get it from other internal objects like IScope.


IBasicScope mainly implements ICoreObject and IPersistable, and provides methods to form a tree style structure (Note that it assumes every node has a parent but not necessary to have a child).


IServiceHandlerProvider provide methods to register serviceHandler, note that serviceHandler is just plain java object.


ResourcePatternResolver a spring interface that provide the ability to load resource from somewhere.


IScope
Implements IBasicScope, ResourcePatternResolver and IServiceHandlerProvider
Manage IConnection and IClient, provide methods to add/remove/find connections or clients attached to current scope, also the connect(IConnection, Object[]) method choose whether or not to accept given connection.
Add/remove/find child scope, note that IScope has the type (which defined in IBasicScope) as "scope".
Retrieve IContext and IScopeStatistics.
Manage a IScopeHandler, it will delegate some method calls to IScopeHandler, IScopeHandler aslo get notified for certain events.


IScopeHandler
Join/leave related to IClient
Connection/disconnection related to IConnection
start/stop and above methods related to IScope
AddChildScope/revmoeChildScope related to IBasicScope


IGlobalScope extends IScope and provide methods to get retrieve IServer and also register (initialize) itself

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics