Smack acquiring RID for prebinding for converse.js/strophe

I am using smack to create a prebind configuration for converse.js

The explanation of converse.js is that i need: the JID, SessionId (SID) and the Request Id (RID)

https://conversejs.org/docs/html/#prebinding-and-single-session-support

Openfire runs on localhost.

Openfire domain = djarshi-laptop

Bosh url is /xmpp-bosh (different then expected but works, it’s a proxy url)

Omitting try catch blocks for reading simplification


XMPPBOSHConnection conn2 = new XMPPBOSHConnection(false, “localhost”, 8080, “/xmpp-bosh”, “djarshi-laptop” );

conn2.connect();

conn2.login( “admin@djarshi-laptop”, “mostsecretpassword” );

String sid = conn2.getConnectionID();

String jid = conn2.getUser();

String rid = ???


Question 1: I am assuming conn2.getConnectionID() is giving me the SID… I hope this is correct?

Question 2: Where do I acquire the Request Id ?

Any advice on pointing me forward is greatly appreciated.

I managed to confirm that the getConnectionId() indeed results in the SID

I noticed that RequestIDSequence isthe class responsible for generating the RID’s

Usage is private and final… extension and overriding only goes so far

BOSHClient has 2 functions that receive this id (the are private tho)

applySessionCreationRequest & applySessionData

any other spots you know of i can wiggle in between by extension of any form to acquire the latest and greatest RID ?