org.xnap.chat
Class AbstractChannel

java.lang.Object
  extended by org.xnap.chat.AbstractChannel
All Implemented Interfaces:
Channel, ChannelInfo
Direct Known Subclasses:
JOscarChannel, LimeWireChatChannel, OpenNapAbstractChannel, PircBotChannel

public abstract class AbstractChannel
extends java.lang.Object
implements Channel


Field Summary
protected  ChannelSupport cs
           
 
Fields inherited from interface org.xnap.chat.Channel
AWAY_MESSAGE_INTERVAL
 
Constructor Summary
AbstractChannel(java.lang.String name)
           
 
Method Summary
 void actionMessageReceived(Peer sender, java.lang.String message)
           
 void add(Peer peer)
           
 void addChannelListener(ChannelListener l)
          Adds listener to the channel.
 void errorReceived(java.lang.String message)
           
 Command[] getCommands()
          Returns null.
 javax.swing.Icon getIcon()
          Returns null.
 java.lang.String getName()
          Returns the name of the channel.
 int getPeerCount()
          Returns the number of peers that have joined this channel.
 Peer[] getPeers()
          Returns an array of peers that have joined this channel.
 java.lang.String getPrefix(Peer peer)
          Returns the empty string.
 java.lang.String getTopic()
          Returns the topic of this channel.
 void infoReceived(java.lang.String message)
           
 void joined()
           
 void messageReceived(Peer sender, java.lang.String message)
           
 void parted(java.lang.String reason)
           
 void peerChanged(Peer peer)
           
 void remove(Peer peer)
           
 void removeChannelListener(ChannelListener l)
          Removes listener from the channel.
 void setTopic(java.lang.String newValue)
           
 void topicChanged(java.lang.String newTopic)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xnap.chat.Channel
close, getActions, getPeerActions, getProvider, isJoined, isLocal, sendMessage
 

Field Detail

cs

protected ChannelSupport cs
Constructor Detail

AbstractChannel

public AbstractChannel(java.lang.String name)
Method Detail

actionMessageReceived

public void actionMessageReceived(Peer sender,
                                  java.lang.String message)

add

public void add(Peer peer)

getPeers

public Peer[] getPeers()
Description copied from interface: Channel
Returns an array of peers that have joined this channel.

Specified by:
getPeers in interface Channel

remove

public void remove(Peer peer)

addChannelListener

public void addChannelListener(ChannelListener l)
Description copied from interface: Channel
Adds listener to the channel.

Specified by:
addChannelListener in interface Channel

removeChannelListener

public void removeChannelListener(ChannelListener l)
Description copied from interface: Channel
Removes listener from the channel.

Specified by:
removeChannelListener in interface Channel

getCommands

public Command[] getCommands()
Returns null.

Specified by:
getCommands in interface Channel

getIcon

public javax.swing.Icon getIcon()
Returns null.

Specified by:
getIcon in interface Channel

getName

public java.lang.String getName()
Description copied from interface: ChannelInfo
Returns the name of the channel.

Specified by:
getName in interface ChannelInfo

getPeerCount

public int getPeerCount()
Description copied from interface: ChannelInfo
Returns the number of peers that have joined this channel.

Specified by:
getPeerCount in interface ChannelInfo

getPrefix

public java.lang.String getPrefix(Peer peer)
Returns the empty string.

Specified by:
getPrefix in interface Channel

getTopic

public java.lang.String getTopic()
Description copied from interface: ChannelInfo
Returns the topic of this channel.

Specified by:
getTopic in interface ChannelInfo

setTopic

public void setTopic(java.lang.String newValue)

joined

public void joined()

parted

public void parted(java.lang.String reason)

errorReceived

public void errorReceived(java.lang.String message)

infoReceived

public void infoReceived(java.lang.String message)

messageReceived

public void messageReceived(Peer sender,
                            java.lang.String message)

peerChanged

public void peerChanged(Peer peer)

topicChanged

public void topicChanged(java.lang.String newTopic)


Copyright © 2001-2005 XNap Team. All Rights Reserved.