Smack 4.2 custom StreamInitiation not supported and FileTransferManager cannot be inherited

Hi

As stated in the title, I am trying to inherit FileTransferManager since I am constructing custom StreamInitiation (for additional data to be sent by si) and FileTransfeRequest. However, the ‘FileTransferManager’ is set to final in 4.2.0 so I could not inherit it and pass my custom FileTransferRequest to FileTransferListener’s fileTransferRequest() method. I am using the custom FileTransferRequest to retrieve the custom SI object and further get the properties I wanted.

Is there any way to do this without inherit the ‘FileTransferManager’ but still using my custom SI and FileTransferRequest ?.

P.S. I have tried to copy/paste all the associated files in smackx.filetransfer into my own project and refactored some of them to fit my custom SI but it still not work.

My file transfer is using IBB and when it goes to ‘initiateIncomingStream’ method, the following blocks of code (originally from StreamNegotiator’s initiateIncomingStream method) gives the variable streamMethodInitiation a null value:

  1. try {
  2. streamMethodInitiation = initationSetEvents.performActionAndWaitForEvent(eventKey, connection.getReplyTimeout(), new EventManger.Callback() {
  3. @Override
  4. public void action() throws NotConnectedException {
  5. try {
  6. connection.sendStanza(response);
  7. }
  8. catch (InterruptedException e) {
  9. // Ignore
  10. }
  11. }
  12. });
  13. }
  14. catch (InterruptedException e) {
  15. // TODO remove this try/catch once merged into 4.2’s master branch
  16. throw new IllegalStateException(e);
  17. }

Anyone encounters this kind of problem or anyone have any idea about this?

Cheers,

Erik

Please do not duplicate questions. I have seen that this is already the thirst post you create with the same question.