Menu

How to get message delivery state?

Help
reset
2006-11-27
2013-04-29
  • reset

    reset - 2006-11-27

    When i send message i want know if my message was deliver.
    How can i know about this?

    Thanks.

     
    • Damian Minkov

      Damian Minkov - 2006-11-27

      Hi,

      you can register net.sf.cindy.SessionListener
      and listen for messageReceived.
      The Messages you need is IncomingACK and the corresponding transactionID (corresponding the id when sending)
      this is for succeeded messages for failed one is IncomingNAK.
      I haven't implemented this behavior but started to implement it.
      you can have a look at
      https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/impl/protocol/msn/EventManager.java?rev=1.1&view=markup
      where I've implemented some of such statuses.
        

       
      • Daniel Henninger

        Ooh, you don't happen to have patches that I could apply to "JML proper" so to speak do you?  I'd definitely appreciate any patches sent back upstream!

         
        • Damian Minkov

          Damian Minkov - 2006-11-27

          I don't have patches. I've extended over the JML library to have some states for the operations.
          I was going to offer you to make this states available jml. but we must think about the interfaces. What listeners to define.
          I was too busy lately and I don't have much time. 

           
          • Daniel Henninger

            Ok, no worries. =)  Looking briefly over your code I see a couple of places we've already 'duplicated work' so to speak.  (like the detection of groups being removed/added/etc)  Anyway, we can chat about it later.  Thanks!

             
    • reset

      reset - 2006-11-27

      Thanks for help.
      But i have new trouble.

      BasicMessenger msnMessenger = null
      ...
      messenger = (BasicMessenger) MsnMessengerFactory.createMsnMessenger(
                      login, password);
      messenger.___AddOtherListeners();
      messenger.addSessionListener(this);
      ("this" implements SessionListener)
      ... (login, ... etc.)

      Also in class "this" implement all methods SessionListener.

      and one of it :
      public void messageReceived(Session session, Message message) throws
                  Exception {
              MsnIncomingMessage incoming = (MsnIncomingMessage) ((WrapperMessage)
                      message).getMessage();
              if (incoming instanceof IncomingACK) {
                  System.out.println("Ok");
                  //indicate the message has successed send to remote user.
                  fireMessageDelivered(((IncomingACK) incoming).getTransactionId());
              }
              else if(incoming instanceof IncomingADC)
              {
                  ....
               }.
      After this, send message : messenger.sendText(email,message);
      Message was send and my IMclient received it.

      But at this place my problem. I never get "IncomingACK".

      Can you help me?

       
    • reset

      reset - 2006-12-21

      Can anybody say me solution of this problem?

      >>When i send message i want know if my message was deliver. 
      >>How can i know about this? 

      Thanks.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.