Part III: current version of openfire and smack?

95 views
Skip to first unread message

MikeRodent

unread,
Oct 2, 2016, 3:51:04 PM10/2/16
to Growing Object-Oriented Software
Hi, can anyone help?

I'm struggling with the auction example (Part III).

Partly this is because the latest version of Openfire is 4.0.3 and I presume you also have to have pretty much the latest version therefore of smack (I've downloaded 4.2)... though I'm not clear about the correspondence between Openfire and smack versions.

It's not just that though: several of the lines in the "Building the test rig" section lead to a compile failure:
Main.main(XMPP_HOSTNAME, SNIPER_ID, SNIPER_PASSWORD, auction.getItemId());
... for this I just created a "stub" Main class

connection.getChatManager().addChatListener(
new ChatManagerListener() {
public void chatCreated(Chat chat, boolean createdLocally) {
currentChat = chat;
}
});
... of course, it is possible that a method "getChatManager" exists with an older version of the class XMPPConnection (now become an interface!)

It appears that you have now to make a new class:
public class AuctionConnection extends XMPPTCPConnection {
    public AuctionConnection(CharSequence jid, String password) throws XmppStringprepException {
        super(jid, password);
... and then create it by going
connection = new AuctionConnection( "admin", "admin" );

... but it's not working (yet) ... :-)

Anyone managed to succeed?

NB please don't tell me to use "any messaging framework"... I  haven't really got a clue about any of this stuff, I just want to follow the TDD process.
 
 

Paul Williams

unread,
Oct 3, 2016, 4:48:40 AM10/3/16
to Growing Object-Oriented Software
Hi Mike, maybe review my post about my attempt on it -> http://blog.pragmatic.me.uk/my-first-attempt-at-the-goos-auction-sniper-pt3/ and associated Github repo -> https://github.com/paulspencerwilliams/auctionsniperjava
Reply all
Reply to author
Forward
0 new messages