Re: [Asterisk-java-devel] ChannelFactory for Live
Brought to you by:
srt
From: Stefan R. <ste...@re...> - 2011-03-07 08:32:20
|
Hi, > As best as I can tell, it's mostly used to restrict access to methods > that generally shouldn't be called by programs using the API, such as > those responsible for firing Live Events, those responsible for handling > the direct ManagerEvents being handled, etc. Yes that was the idea behind it. The methods in the interface are for users of the API and the methods of the *Impl classes that are not part of the interface are for the corresponding *Manager to update the state of the live object when the AMI events are processed. > I agree, it does provide a lot of nice default functionality. However, > it seems to me to be designed to be used internally only. Most of the > properties of the channel are read-only in actuality, such as name, > unique id, caller id, etc, but have setters defined. It could be > confusing to users to have these setters available publicly, since they > don't do anything to the channel itself, only to the java object > representing it. Indeed. The "write" methods in the interface cause interaction with Asterisk and actually modify the state of the corresponding concept there. What is lacking currently is a clear and easy way of extending the live API. This would require extending the *Manager, the *Impl and the interface. I would like to keep the interface for the "end user" separate from what the *Manager uses to update the state. This can either be done by the current interface/impl separation or maybe by having some kind of a companion class for the live object. =Stefan |