Matt and others,
I’‘ve created XMPPConnection(server,port,connect) as mentioned in XMPPConnection.connect thread today. Now I have a comment about the connectionListeners. They are split into separate interfaces for connection established and disconnect. With this split I can’'t have the same object implement both ConnectionListener and ConnectionEstablishedListener interfaces. The compiler complains when I try to add my dual listener object connectionDisplay with con.addConnectionListener(connectionDisplay);
Here’'s my question. Why are the connection listeners split into two interfaces? Why not just have a single connection listener with methods
and remove the ConnectionEstablishedListener interface. With the current implementation of XMPPConnection, you can’‘t use ConnectionEstablishedListeners anyway (you can’‘t add a ConnectionEstablishedListener until after the connection is created and you can’'t call XMPPConnection.init to reconnect because its private).
If this sounds good, then I’‘ll make these changes and send someone my diffs. If you don’‘t want this kind of change, then I’'ll hack XMPPConnection and change the method called
addConnectionListener(ConnectionEstablishedListener connectionEstablishedListener) to addConnectionEstablishedListener and be done with it. Let me know.