f00f.net.irc.martyr
Class GenericCommandAutoService

java.lang.Object
  extended by f00f.net.irc.martyr.GenericCommandAutoService
All Implemented Interfaces:
java.util.Observer
Direct Known Subclasses:
AutoDccSetup, GenericAutoService, IRCConsole.CommandListener

public abstract class GenericCommandAutoService
extends java.lang.Object
implements java.util.Observer

Provides a framework for an auto service that operates with InCommands. Does enable by default. Splits the 'update' method into two, 'updateState' and 'updateCommand'. Also provides thread safety on all methods.


Field Summary
protected  IRCConnection connection
           
protected  boolean enabled
           
 
Constructor Summary
protected GenericCommandAutoService(IRCConnection connection)
           
 
Method Summary
 void disable()
           
 void enable()
           
protected  IRCConnection getConnection()
           
protected  boolean isEnabled()
           
 void update(java.util.Observable observer, java.lang.Object updated)
           
protected abstract  void updateCommand(InCommand command)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

enabled

protected boolean enabled

connection

protected IRCConnection connection
Constructor Detail

GenericCommandAutoService

protected GenericCommandAutoService(IRCConnection connection)
Method Detail

enable

public void enable()

disable

public void disable()

update

public void update(java.util.Observable observer,
                   java.lang.Object updated)
Specified by:
update in interface java.util.Observer

getConnection

protected IRCConnection getConnection()

isEnabled

protected boolean isEnabled()

updateCommand

protected abstract void updateCommand(InCommand command)


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