f00f.net.irc.martyr.services
Class AutoJoin

java.lang.Object
  extended by f00f.net.irc.martyr.GenericCommandAutoService
      extended by f00f.net.irc.martyr.GenericAutoService
          extended by f00f.net.irc.martyr.services.AutoJoin
All Implemented Interfaces:
java.util.Observer

public class AutoJoin
extends GenericAutoService

AutoJoin joins a group if the IRCConnection is ready. It will wait until it is ready if it is not (by waiting for the REGISTERED state change).

AutoJoin maintains a persistent Join (re-join if kicked). AutoJoin can cease to be persistent by calling the 'disable' method.


Field Summary
 
Fields inherited from class f00f.net.irc.martyr.GenericCommandAutoService
connection, enabled
 
Constructor Summary
AutoJoin(IRCConnection connection, java.lang.String channel)
           
AutoJoin(IRCConnection connection, java.lang.String channel, java.lang.String key)
           
 
Method Summary
protected  void performJoin()
          Sets up and sends the join command.
protected  void scheduleJoin()
           
protected  void sendJoinCommand()
          This method sends the actual command.
protected  void setupJoin()
          Performs various tasks immediatly prior to sending a join command.
 java.lang.String toString()
           
protected  void updateCommand(InCommand command_o)
           
protected  void updateState(State state)
           
 
Methods inherited from class f00f.net.irc.martyr.GenericAutoService
disable, enable, update
 
Methods inherited from class f00f.net.irc.martyr.GenericCommandAutoService
getConnection, isEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AutoJoin

public AutoJoin(IRCConnection connection,
                java.lang.String channel)

AutoJoin

public AutoJoin(IRCConnection connection,
                java.lang.String channel,
                java.lang.String key)
Method Detail

updateState

protected void updateState(State state)
Specified by:
updateState in class GenericAutoService

updateCommand

protected void updateCommand(InCommand command_o)
Specified by:
updateCommand in class GenericCommandAutoService

performJoin

protected void performJoin()
Sets up and sends the join command.


setupJoin

protected void setupJoin()
Performs various tasks immediatly prior to sending a join command. Called from performJoin.


sendJoinCommand

protected void sendJoinCommand()
This method sends the actual command. Called from performJoin.


scheduleJoin

protected void scheduleJoin()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2000-2007 Ben Damm, Daniel Henninger, et al.