Package hudson.plugins.im

Examples of hudson.plugins.im.IMException


      groupChat = new MultiUserChat(this.connection, chat.getName());
      try {
        groupChat.join(this.groupChatNick, chat.getPassword());
      } catch (XMPPException e) {
        LOGGER.warning("Cannot join group chat '" + chat + "'. Exception:\n" + ExceptionHelper.dump(e));
        throw new IMException(e);
      } catch (SmackException e) {
                LOGGER.warning("Cannot join group chat '" + chat + "'. Exception:\n" + ExceptionHelper.dump(e));
                throw new IMException(e);
            }

      // get rid of old messages:
      while (groupChat.pollMessage() != null) {
      }
View Full Code Here


    @Override
    public synchronized IMConnection createConnection() throws IMException {
        releaseConnection();

        if (getDescriptor() == null) {
          throw new IMException("Descriptor not set");
        }
       
        IMConnection imConnection = new JabberIMConnection((JabberPublisherDescriptor)getDescriptor(),
            getAuthenticationHolder());
        if (imConnection.connect()) {
          return imConnection;
        }
        throw new IMException("Connection failed");
    }
View Full Code Here

    public void sendMessage(String msg) throws IMException {
        try {
            this.chat.sendMessage(msg);
        } catch (XMPPException e) {
            throw new IMException(e);
        } catch (SmackException.NotConnectedException e) {
            throw new IMException(e);
        }
    }
View Full Code Here

    public void sendMessage(String msg) throws IMException {
        try {
            this.chat.sendMessage(msg);
        } catch (XMPPException e) {
            throw new IMException(e);
        } catch (SmackException.NotConnectedException e ){
            throw new IMException(e);
        }
    }
View Full Code Here

TOP

Related Classes of hudson.plugins.im.IMException

Copyright © 2018 www.massapicom. 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.