class XMPPNotification implements NotificationMethods {

    void sendMultiUserMessage (Message msg,
                               EntityBareJid jid) throws InterruptedException, IOException, SmackException, XMPPException, KeyManagementException, NoSuchAlgorithmException {
        AbstractXMPPConnection connection = getConnection();
        Resourcepart room = Resourcepart.from(jid.getLocalpart().asUnescapedString());
        MultiUserChat muc = getMultiUserChat(connection, jid);
        muc.join(room);
        msg.setType(Message.Type.groupchat);
        muc.sendMessage(msg);
        connection.disconnect();
    }

    @Autowired public  XMPPNotification();

}