Package org.jivesoftware.smack

Examples of org.jivesoftware.smack.XMPPConnection.disconnect()


    } catch (XMPPException e) {
      log.error("Error occurred while sending the message : "+message.toXML(),e);
      handleException("Error occurred while sending the message : "+message.toXML(),e);
    }finally{
      if(!msgCtx.isServerSide()){
        xmppConnection.disconnect();
      }
    }
    } 
   
   
View Full Code Here


            js0.terminate();

            Thread.sleep(6000);

            x0.disconnect();
            x1.disconnect();

        } catch (Exception e) {
            e.printStackTrace();
        }
View Full Code Here

            js0.terminate();

            Thread.sleep(6000);

            x0.disconnect();
            x1.disconnect();

        } catch (Exception e) {
            e.printStackTrace();
        }
View Full Code Here

                        js0.terminate();

                        Thread.sleep(3000);

                        x0.disconnect();
                        x1.disconnect();

                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                }
View Full Code Here

            js0.terminate();

            Thread.sleep(3000);

            x0.disconnect();
            x1.disconnect();

        } catch (Exception e) {
            e.printStackTrace();
        }
View Full Code Here

            AccountManager manager = connection.getAccountManager();
            manager.createAccount(username, password);
            monitor.worked(1);

            connection.disconnect();
        } catch (XMPPException e) {
            String message = e.getMessage();
            XMPPError error = e.getXMPPError();
            if (error != null) {
                message = error.getMessage();
View Full Code Here

            AccountManager manager = connection.getAccountManager();
            manager.createAccount(username, password);
            monitor.worked(1);

            connection.disconnect();
        } finally {
            monitor.done();
        }
    }
View Full Code Here

        XMPPConnection connection = new XMPPConnection(serverAddress);
        connection.connect();
        connection.login(username, defaultPassword);
        AccountManager manager = connection.getAccountManager();
        manager.deleteAccount();
        connection.disconnect();
    }
}
View Full Code Here

            for (int i = 0; i < 10; i++) {
                System.out.println("Sending message: " + i);
                chat.sendMessage("Hello from Message: " + i);
            }
            System.out.println("Sent all messages!");
            con.disconnect();
        } catch (XMPPException e) {
            if (block) {
                System.out.println("Caught: " + e);
                e.printStackTrace();
            } else {
View Full Code Here

        System.out.println();
        System.out.println("Closing down");
        System.out.println();
        System.out.println();

        remoteClient.disconnect();
        localClient.disconnect();
       
        Thread.sleep(5000);
       
        server.stop();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.