wtanaka.praya.module
Class Chimer

java.lang.Object
  |
  +--wtanaka.praya.Protocol
        |
        +--wtanaka.praya.module.Chimer
All Implemented Interfaces:
java.io.Serializable

public class Chimer
extends Protocol

Simple protocol implementation that sends an InfoMessage every 20 seconds.

Return to Sourceforge or the Praya Homepage

Version:
$Name: $ $Date: 2002/07/13 22:08:14 $
Author:
Wesley Tanaka
See Also:
Serialized Form

Inner Class Summary
private  class Chimer.ChimerTimer
           
 
Field Summary
private  Chimer.ChimerTimer m_chimer
           
private  java.lang.Thread m_thread
           
 
Fields inherited from class wtanaka.praya.Protocol
descriptionListeners, iAmGarbage, m_buddyList, m_configPanel, m_currentDescription, m_messageListeners, recipientListeners
 
Constructor Summary
Chimer()
           
 
Method Summary
 void checkForNewMessages(boolean isAutomatic)
          Checks for new messages on the protocol.
 void connect()
          Connects to the network, if that makes any sense.
 CommandInterface[] consoleCommands()
          Returns a list of commands available through this console.
 void disconnect()
          Disconnects from the network, if that makes any sense.
 Recipient getDefaultRecipient()
           
 boolean isConnected()
          Returns if the protocol is connected right now.
 void setStatus(Status s)
          Sets the currently connected user's status to the given status.
 java.lang.String toString()
           
 
Methods inherited from class wtanaka.praya.Protocol
addDescriptionListener, addListener, addRecipient, addRecipientListener, changeRecipientStatus, clearBuddyList, console, fireDescriptionChanged, fireRecipientAppeared, fireRecipientChanged, fireRecipientDisappeared, getBuddies, getConfigPanelInstance, getConfiguration, getCurrentDescription, getIcon, getObjInstance, getProtocolDescription, getStatusForBuddy, initialize, isGarbage, markAsGarbage, pushMessage, readObject, removeDescriptionListener, removeListener, removeRecipient, removeRecipientListener, setCurrentDescription, writeObject
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

m_chimer

private Chimer.ChimerTimer m_chimer

m_thread

private volatile java.lang.Thread m_thread
Constructor Detail

Chimer

public Chimer()
Method Detail

connect

public void connect()
Description copied from class: Protocol
Connects to the network, if that makes any sense. skip if it does not.
Overrides:
connect in class Protocol
Following copied from class: wtanaka.praya.Protocol
Throws:
java.io.IOException - if the connection fails due to an I/O error.
java.lang.InterruptedException - todo, why does it throw this?

disconnect

public void disconnect()
Description copied from class: Protocol
Disconnects from the network, if that makes any sense. skip if it does not.
Overrides:
disconnect in class Protocol

isConnected

public boolean isConnected()
Description copied from class: Protocol
Returns if the protocol is connected right now. Good for telling if you need to call connect() again after the connection dies.
Overrides:
isConnected in class Protocol

checkForNewMessages

public void checkForNewMessages(boolean isAutomatic)
Description copied from class: Protocol
Checks for new messages on the protocol. This might make sense for nntp/usenet, email, etc. but not for irc, gale, zephyr, icq. If any new messages are found, push them.
Overrides:
checkForNewMessages in class Protocol
Following copied from class: wtanaka.praya.Protocol
Parameters:
isAutomatic - true if the check is generated automatically with a timer. false if the check is generated manually by the user.

getDefaultRecipient

public Recipient getDefaultRecipient()
Overrides:
getDefaultRecipient in class Protocol

setStatus

public void setStatus(Status s)
Description copied from class: Protocol
Sets the currently connected user's status to the given status.
Overrides:
setStatus in class Protocol

toString

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

consoleCommands

public CommandInterface[] consoleCommands()
Description copied from class: Protocol
Returns a list of commands available through this console.
Overrides:
consoleCommands in class Protocol
See Also:
Protocol.consoleCommands()