Package rocks.xmpp.core.session

Examples of rocks.xmpp.core.session.XmppSession.send()


                Assert.assertNull(e.getMessage().getExtension(Request.class));
            }
        });

        Message message = new Message(JULIET);
        xmppSession1.send(message);
    }

    /**
     * A sender could request receipts on any non-error content message
     */
 
View Full Code Here


        });

        Message message = new Message(JULIET);
        message.setType(Message.Type.ERROR);
        message.setId("123");
        xmppSession1.send(message);
    }

    @Test
    public void testDisabledManager() {
        MockServer mockServer = new MockServer();
View Full Code Here

            }
        });

        Message message = new Message(JULIET);
        message.setId("123");
        xmppSession1.send(message);
    }

    @Test
    public void testEnablingManager() {
        TestXmppSession connection1 = new TestXmppSession();
View Full Code Here

                    // Connect
                    xmppSession.connect();
                    // Login
                    xmppSession.login("111", "111", "filetransfer");
                    // Send initial presence
                    xmppSession.send(new Presence());

                    FileTransferManager fileTransferManager = xmppSession.getExtensionManager(FileTransferManager.class);
                    FileTransfer fileTransfer = fileTransferManager.offerFile(new File("info.png"), "Description", new Jid("222", xmppSession.getDomain(), "filetransfer"), 5000);
                    fileTransfer.transfer();
View Full Code Here

                    // Connect
                    xmppSession.connect();
                    // Login
                    xmppSession.login("222", "222", "muc");
                    // Send initial presence
                    xmppSession.send(new Presence());

                    MultiUserChatManager multiUserChatManager = xmppSession.getExtensionManager(MultiUserChatManager.class);
                    ChatService chatService = multiUserChatManager.createChatService(Jid.valueOf("conference." + xmppSession.getDomain()));
                    ChatRoom chatRoom = chatService.createRoom("test");
                    chatRoom.addOccupantListener(new OccupantListener() {
View Full Code Here

//                            System.out.println(e.getPublisher() + " updated his location: " + e.getGeoLocation());
//                        }
//                    });

                    // Send initial presence
                    xmppSession.send(new Presence());

                } catch (IOException | LoginException e) {
                    e.printStackTrace();
                }
            }
View Full Code Here

                    // Connect
                    xmppSession.connect();
                    // Login
                    xmppSession.login("111", "111", "muc");
                    // Send initial presence
                    xmppSession.send(new Presence());

                    MultiUserChatManager multiUserChatManager = xmppSession.getExtensionManager(MultiUserChatManager.class);
                    ChatService chatService = multiUserChatManager.createChatService(Jid.valueOf("conference." + xmppSession.getDomain()));
                    ChatRoom chatRoom = chatService.createRoom("test");
                    chatRoom.addOccupantListener(new OccupantListener() {
View Full Code Here

                    // Connect
                    xmppSession.connect();
                    // Login
                    xmppSession.login("222", "222", "filetransfer");
                    // Send initial presence
                    xmppSession.send(new Presence());

                    FileTransferManager fileTransferManager = xmppSession.getExtensionManager(FileTransferManager.class);
                    fileTransferManager.addFileTransferOfferListener(new FileTransferOfferListener() {
                        @Override
                        public void fileTransferOffered(FileTransferOfferEvent e) {
View Full Code Here

                    // Connect
                    xmppSession.connect();
                    // Login
                    xmppSession.login("111", "111", "geolocation");
                    // Send initial presence
                    xmppSession.send(new Presence());

//                    GeoLocationManager geoLocationManager = xmppSession.getExtensionManager(GeoLocationManager.class);
//                    geoLocationManager.publish(new GeoLocation(123, 321));

                } catch (IOException | LoginException e) {
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.