Package org.schwering.irc.lib

Examples of org.schwering.irc.lib.IRCConnection


 
  public L2IrcClient(String host, int port, String pass, String nick, String user, String name, boolean ssl, String Chan)
  {
    if (!ssl)
    {
      conn = new IRCConnection(host, new int[] { port }, pass, nick, user, name);
    }
    else
    {
      conn = new SSLIRCConnection(host, new int[] { port }, pass, nick, user, name);
      ((SSLIRCConnection)conn).addTrustManager(new TrustManager());
View Full Code Here


  }

  @Override
  public void open() throws IOException {
    // TODO (jon) check if the nick usage was successful or not
    conn = new IRCConnection(host, new int[] { port }, pass, nick, user, name);
    conn.addIRCEventListener(new Listener());
    conn.setEncoding(FlumeConfiguration.get().getFlurkerEncoding());
    conn.setPong(true);
    conn.setDaemon(false);
    conn.setColors(false);
View Full Code Here

    {
        // cleanup connections
        for ( Iterator<String> keys = hostConnections.keySet().iterator(); keys.hasNext(); )
        {
            String key = keys.next();
            IRCConnection connection = hostConnections.get( key );
            if ( connection.isConnected() )
            {
                connection.doQuit( "Continuum shutting down" );
                connection.close();
            }
        }

    }
View Full Code Here

    private IRCConnection getIRConnection( String host, int port, String password, String nick, String alternateNick,
                                           String userName, String realName, String channel, boolean ssl )
        throws IOException
    {
        String key = getConnectionKey( host, port, nick, alternateNick );
        IRCConnection conn = hostConnections.get( key );
        if ( conn != null )
        {
            checkConnection( conn, key );
            return conn;
        }

        if ( !ssl )
        {
            conn = new IRCConnection( host, new int[]{port}, password, nick, userName, realName );
        }
        else
        {
            conn = new SSLIRCConnection( host, new int[]{port}, password, nick, userName, realName );
            ( (SSLIRCConnection) conn ).addTrustManager( new SSLDefaultTrustManager() );
        }

        conn.addIRCEventListener( new Listener( conn, nick, alternateNick ) );
        checkConnection( conn, key );
        checkChannel( conn, key, channel );
        hostConnections.put( key, conn );
        return conn;
    }
View Full Code Here

        boolean isSsl = Boolean.parseBoolean( (String) configuration.get( "ssl" ) );

        try
        {
            IRCConnection ircConnection = getIRConnection( host, port, password, nickName, alternateNickName, userName,
                                                           fullName, channel, isSsl );
            ircConnection.doPrivmsg( channel, generateMessage( project, build ) );
        }
        catch ( IOException e )
        {
            throw new NotificationException( "Exception while checkConnection to irc ." + host, e );
        }
View Full Code Here

    for (int i = 0; i < ports.length; i++) {
      ports[i] = portsList.get(i);
    }

    IRCConnectionHandler answer = new IRCConnectionHandler();
    IRCConnection connection;

    if (useSSL) {
      connection = new SSLIRCConnection(host, ports, pass, nick, username, realname);
      ((SSLIRCConnection) connection).addTrustManager(new SSLDefaultTrustManager());
    } else {
      connection = new IRCConnection(host, ports, pass, nick, username, realname);
    }

    connection.addIRCEventListener(answer);
    answer.setConnection(connection);

    connection.setDaemon(true);
    connection.setColors(false);
    connection.setPong(true);

    connection.connect();

    return answer;
  }
View Full Code Here

    this(host, port, nick, null, null, null, chan, false);
  }

  public void open() throws IOException {

    conn = new IRCConnection(host, new int[] { port }, pass, nick, user, name);
    conn.addIRCEventListener(new Listener());
    conn.setEncoding("UTF-8");
    conn.setPong(true);
    conn.setDaemon(false);
    conn.setColors(false);
View Full Code Here

  }

  @Override
  public void open() throws IOException {
    // TODO (jon) check if the nick usage was successful or not
    conn = new IRCConnection(host, new int[] { port }, pass, nick, user, name);
    conn.addIRCEventListener(new Listener());
    conn.setEncoding(FlumeConfiguration.get().getFlurkerEncoding());
    conn.setPong(true);
    conn.setDaemon(false);
    conn.setColors(false);
View Full Code Here

TOP

Related Classes of org.schwering.irc.lib.IRCConnection

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.