Examples of IRCID


Examples of org.eclipse.ecf.internal.provider.irc.identity.IRCID

    fireContainerEvent(new ContainerConnectingEvent(this.getID(),
        connectID, connectContext));
    // Get password via callback in connectContext
    String pw = getPasswordFromConnectContext(connectContext);
    IRCID tID = (IRCID) connectID;
    String host = tID.getHost();
    int port = tID.getPort();
    String pass = pw;
    String nick = tID.getUser();
    String user = nick;
    this.username = user;
    String name = null;
    boolean ssl = false;
    if (!ssl) {
      connection = new IRCConnection(host, new int[] { port }, pass,
          nick, user, name);
    } else {
      connection = new SSLIRCConnection(host, new int[] { port }, pass,
          nick, user, name);
    }
    // connection setup
    connection.addIRCEventListener(getIRCEventListener());
    connection.setPong(true);
    connection.setDaemon(false);
    connection.setColors(true);
    if (encoding != null)
      connection.setEncoding(encoding);
    trace(Messages.IRCRootContainer_Connecting_To + targetID);
    synchronized (connectLock) {
      connectWaiting = true;
      connectException = null;
      try {
        connection.connect();
        long timeout = CONNECT_TIMEOUT + System.currentTimeMillis();
        while (connectWaiting && (timeout > System.currentTimeMillis())) {
          connectLock.wait(2000);
        }
        if (connectWaiting)
          throw new TimeoutException(NLS.bind(
              Messages.IRCRootContainer_Connect_Timeout,
              tID.getName()), CONNECT_TIMEOUT);
        if (connectException != null)
          throw connectException;
        this.targetID = tID;
        fireContainerEvent(new ContainerConnectedEvent(getID(),
            this.targetID));
View Full Code Here

Examples of org.eclipse.ecf.internal.provider.irc.identity.IRCID

    // If it's not already connected, then we connect this new container
    if (!ui.isContainerConnected()) {
      page.saveComboItems();
     
      // bug 274613, we need to remove the extra autojoin channel bits
      IRCID id = (IRCID) targetID;
      // start with user, then host, then port, abc@irc.freenode.net:6667
      StringBuffer buffer = new StringBuffer(id.getUsername());
      buffer.append('@').append(id.getHost());
      buffer.append(':').append(id.getPort());
      // create a truncated ID instance for the container to connect to
      id = (IRCID) container.getConnectNamespace().createInstance(
          new Object[] { buffer.toString() });
         
      new AsynchContainerConnectAction(container, id, connectContext, null, new Runnable() {
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.