#1 for me...
> Trustin Lee wrote: > > Hi community, > > > > Currently, MINA 2.0.0-M1-SNAPSHOT doesn't allow a user to call > > setLocalAddresses() after IoAcceptor.bind() is called. To change the > > local addresses, a user have to unbind, change the localAddresses > > property and bind again, which is not very convenient and causes > > interruption of service. > > > > MINA 1.x doesn't have this problem because user always specify the > > local address and the IoHandler for each bind() call and the local > > address for each unbind() (or unbindAll()). > > > > However, considering an IoService is a logical group of managed > > sessions with the same business logic, specifying IoHandler for every > > bind() call doesn't make sense. That's why we removed handler > > parameter from bind() method. One mistake I've made at the moment of > > the change is that I also removed the local address parameter from the > > bind() method. I'd like to know what change do you prefer. Let me > > list my idea: > > > > 1) Change localAddress(es) to represent the list of the currently > > bound addresses. Add defaultLocalAddress(es) property, which is used > > when bind() method is called with no parameter. Also add > > bind(localAddress), unbind(localAddress) and unbindAll() methods. > > > > 2) Retain the current trunk API and let setLocalAddresses() method > > decide what address to bind and what address to unbind. > > > > I think the first solution is better because A) it resembles the 1.x > > API, 2) is easy to understand and 3) IoConnector already has the > > similar API design: > > * > http://mina.apache.org/report/trunk/apidocs/org/apache/mina/common/IoConnector.html > > (defaultRemoteAddress) > > > > What do you think about the suggested changes? Any feed back or whole > > new idea is appreciated. If there's no objection within next 72 > > hours, I will execute the idea #1. > > > > Thank in advance, > > Trustin > > -- -------------------------------- The adjuration to be "normal" seems shockingly repellent to me; I see neither hope nor comfort in sinking to that low level. I think it is ignorance that makes people think of abnormality only with horror and allows them to remain undismayed at the proximity of "normal" to average and mediocre. For surely anyone who achieves anything is, essentially, abnormal. Dr. Karl Menninger
