last day (15 days later) » 

14:00
Hey
I have a concept related problem. I have started to write a XMPP client..But there are some conceptual problems I am facing..I just don't know how to implement them
For example :
In this User-A wants to add User-B in his roster
so, user-A sends a request..
But first, it needs to be checked if User-B exists
If User-B exists, request is placed into the RequestQueue. When User-B comes online,it sees all the requests and will accept accordingly
I just don't know, how to implement this with SMACK and using openfire
Client sends all the requests to Apache Tomcat running remotely. Database and Openfire are running on the same machine where Apache Tomcat is running
Application operated by User-A and of course User-B is a XMPP Client
Can you please help me..How do I do this ?
I just cannot understand, how/when do I use statements of the type :
        Presence subscribe = new Presence(Presence.Type.subscribe);
        subscribe.setTo("XYZ@localhost");
        connection.sendPacket(subscribe);
Thanks for joining
14:22
When using a chat client, I can add a 'contact' (user-B). At that point, you will do the above (which is equivalent to asking "can we be friends")
I didn't get you
I don't know your application but I guess that at some point in time, user-A will add (in the UI?) user-B to his list of friends, right?
At that point, you should send the subscribe packet above
When User-A sends a request to User-B..that is routed via tomcat/database..
All User-B knows is, that there is a friend request from User-A
nothing else
14:30
yes, and then user-B can accept it (by sending a "subscribed" packet back)
Most likely, userB will also send a "subscribe" packet to "user-A" which in turn will also send a "subscribed" packet back to userB
Initially will User-A also send a packet like :
            subscribe.setTo("user-b@localhost");
            connection.sendPacket(subscribe);
?
Can you explain me the whole process..Who sends and how ? There are 2 servers and a database involved
What will be the role of each of it ?
What are the jabber ids of the two users? user-a@localhost and user-b@locahost? If so, why are there two servers?
2 servers: One is Tomcat
and another is openfire
But Tomcat is not relevant here, right?
Why ?
It handles requests like :
try {
            String userToSearch = jButton1.getText();
            String urlWithParameter = Constants.serverURL + Constants.searchUserServlet + "?us=" + userToSearch;
            URL url = new URL(urlWithParameter);
            HttpURLConnection connection = (HttpURLConnection) url.openConnection();
            if(connection.getResponseCode() == 200) {

            }else {
                throw new Exception("Exception : Response code obtained is " + connection.getResponseMessage() + " while sending a request to search for the user");
Like checking if user exists or not
For other purposes also
14:39
ok
1) user-A sends a "subscribe" to user-B
2) user-B sends a "subscribed" to user-A
3) user-B sends a "subscribe" to user-A
4) user-A sends a "subscribed" to user-B
Suppose User-B is offline when User-A sends him a request
then it can take some time before 2) happens
(and hence also 3) and 4))
you mean..the request stays there stashed in the openfire server
?
okay
Is it possible that a 4 line process be converted to a 2 line process ?
14:52
2) and 4) are done by the XMPP library if you configure
        roster.setSubscriptionMode(SubscriptionMode.accept_all);
have to go now, will check again later today
okay
I will get back to you..if I face any other problem :)

last day (15 days later) »