[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ecf-dev] Replacing ConnectionConfiguration
- From: Scott Lewis <slewis@xxxxxxxxxxxxx>
- Date: Fri, 26 Nov 2010 07:43:24 -0800
- Delivered-to: firstname.lastname@example.org
- User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:126.96.36.199) Gecko/20101027 Lightning/1.0b2 Thunderbird/3.1.6
On 11/26/2010 5:56 AM, Karl Beecher wrote:
Within my application, I am currently trying to replace Smack's
XMPPConnection with ECF's XMPPContainer, about which I have a question.
In one instance, we construct an XMPPConnection using the constructor:
In making the config object we:
- set URI (host and port)
- pass a ProxyInfo object
- call setSecurityMode()
- call setReconnectionAllowed()
As far as I can see, an XMPPContainer doesn't accept a
ConnectionConfiguration and there is no equivalent in ECF to use.
Furthermore, I can't see alternative ways in an XMPPContainer to
configure the specific information I list above.
The equivalent of what you are doing in terms of XMPPConnection creation
and connection configuration is done in this class:
Specifically the equivalent of what you are doing is in the
ECFConnection.connect(ID remote, Object data, int timeout) method.
The ECFConnection instance is actually created for the XMPP container at
connect time via this method in class
protected ISynchAsynchConnection createConnection(ID remoteSpace,
Object data) throws ConnectionCreateException
If you wanted to enhance the ECFConnection class itself to add further
configuration information, then if you contribute it back we can/could
add it to the next release. Another option would be to create a brand
new xmpp provider...and override XMPPContainer.createConnection to
create your own ECFConnection subclass.