net.jackofalltrades.irc.impl
Class PingResponder

java.lang.Object
  extended bynet.jackofalltrades.irc.impl.PingResponder
All Implemented Interfaces:
java.util.EventListener, IrcCommandListener

public class PingResponder
extends java.lang.Object
implements IrcCommandListener

Listeners for PING commands from the server and responds with the appropriate PONG message.

 // create a connection to "irc.irchighway.net" on port 6667.
 IrcConnection connection = new IrcConnection("irc.darkmyst.net", 6667);
 
 // add an instance of PingResponder to automatically response to PING
 // messages from the server.
 connection.addIrcCommandListener(new PingResponder());
 

Version:
$Revision: 1.4 $ $Date: 2003/08/03 21:01:36 $
Author:
Bradley M. Handy (bhandy@users.sf.net)

Constructor Summary
PingResponder()
          Creates a new instance of PingResponder
 
Method Summary
 void commandPrepared(IrcCommandEvent event)
          Does nothing.
 void commandReceived(IrcCommandEvent event)
          Invoked when a command is received from an IRC server or when a Connection object wishes to send a command to the server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PingResponder

public PingResponder()
Creates a new instance of PingResponder

Method Detail

commandReceived

public void commandReceived(IrcCommandEvent event)
Invoked when a command is received from an IRC server or when a Connection object wishes to send a command to the server.

Specified by:
commandReceived in interface IrcCommandListener

commandPrepared

public void commandPrepared(IrcCommandEvent event)
Does nothing.

Specified by:
commandPrepared in interface IrcCommandListener


Copyright © 2002-2003 Jack-of-all-trades Programming Services. All Rights Reserved.