com.valhalla.jbother
Class ConnectorThread

java.lang.Object
  extended bycom.valhalla.jbother.ConnectorThread
All Implemented Interfaces:
java.lang.Runnable

public class ConnectorThread
extends java.lang.Object
implements java.lang.Runnable

Attempts to connect to the server. If the connection is made successfully, it sets up the various packet listeners and displays the BuddyList

Version:
1.0
Author:
Adam Olsen

Constructor Summary
ConnectorThread(org.jivesoftware.smack.packet.Presence.Mode connectMode, java.lang.String statusString, boolean away)
          Sets up the connector thread
 
Method Summary
static ConnectionListener getConnectionListener()
          Returns the ConnectionListener
 void run()
          Called when the Threads .start() method is called
static void setCancelled(boolean c)
           
static void setHasHadError(boolean has)
          Sets whether or not a connection error has already been thrown for this connection
 void setPersistent(boolean persistent)
          Sets whether or not this thread should try to reconnect if there is a connection error
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectorThread

public ConnectorThread(org.jivesoftware.smack.packet.Presence.Mode connectMode,
                       java.lang.String statusString,
                       boolean away)
Sets up the connector thread

Method Detail

setCancelled

public static void setCancelled(boolean c)

setPersistent

public void setPersistent(boolean persistent)
Sets whether or not this thread should try to reconnect if there is a connection error


getConnectionListener

public static ConnectionListener getConnectionListener()
Returns the ConnectionListener

Returns:
the connection listener

setHasHadError

public static void setHasHadError(boolean has)
Sets whether or not a connection error has already been thrown for this connection

Parameters:
has - true if an error has already been thrown

run

public void run()
Called when the Threads .start() method is called

Specified by:
run in interface java.lang.Runnable