[JDEV] Jabber Client and presence ( using JabberBeans)

Adrian Brown brown.adrian at btinternet.com
Tue Dec 3 08:30:58 CST 2002


I'm trying to send a <presence> packet to another client (in my effort 
to avoid rosters - which are pointless for my client), In constructing
the  <presence> packet to send to a specified address, I've tried 
adding the type = 'available' but when I look at the debug, this is 
never sent or received.  But the presence packet is:

REC: <presence to="adrian2000 at jabber.org" 
from="adrianxp at jabber.org/work" id="p1"></presence>

Anyone have any ideas?

         pb.reset();

         pb.setToAddress( UserJIDKit.getRemoteJID() );

         pb.setType( "available" );// this doesnt get added to the 
packet, can't work out why?

	pb.setIdentifier( "p1" );

         try {

             cb.send( pb.build() );

             System.out.println( "Subscribing" );

        }

        catch( InstantiationException e ) {

             System.out.println( "Could not subscribe" );

         }

      }

Thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1222 bytes
Desc: not available
URL: <https://www.jabber.org/jdev/attachments/20021203/b238a6b2/attachment-0002.bin>


More information about the JDev mailing list