org.xnap.chat
Interface Channel

All Superinterfaces:
ChannelInfo
All Known Implementing Classes:
AbstractChannel, JOscarChannel, LimeWireChatChannel, OpenNapAbstractChannel, OpenNapChannel, PircBotChannel, PrivateOpenNapChannel

public interface Channel
extends ChannelInfo

Defines the requirements for classes that provide chat functionality. Peers can join a channel in order to broadcast messages to all joined peers.


Field Summary
static long AWAY_MESSAGE_INTERVAL
          Send away messages in this interval.
 
Method Summary
 void addChannelListener(ChannelListener listener)
          Adds listener to the channel.
 void close()
          Invoked by the ChatManager when the channel is removed.
 javax.swing.Action[] getActions()
          Returns an array of actions that can be performed on the channel.
 Command[] getCommands()
          Returns an array of commands that can be executed on the channel.
 javax.swing.Icon getIcon()
          Returns a 16x16 icon that is displayed in the tab title.
 javax.swing.Action[] getPeerActions(Peer peer)
          Returns an array of peer specific actions.
 Peer[] getPeers()
          Returns an array of peers that have joined this channel.
 java.lang.String getPrefix(Peer peer)
          Returns a name prefix for peer.
 ChatProvider getProvider()
          Returns a reference to the chat provider.
 boolean isJoined()
          Returns true, if the channel is joined.
 boolean isLocal(Peer peer)
          Returns true, if peer is the local peer.
 void removeChannelListener(ChannelListener listener)
          Removes listener from the channel.
 void sendMessage(java.lang.String message)
          Sends a message to this channel.
 
Methods inherited from interface org.xnap.chat.ChannelInfo
getName, getPeerCount, getTopic
 

Field Detail

AWAY_MESSAGE_INTERVAL

static final long AWAY_MESSAGE_INTERVAL
Send away messages in this interval.

See Also:
Constant Field Values
Method Detail

addChannelListener

void addChannelListener(ChannelListener listener)
Adds listener to the channel.


close

void close()
Invoked by the ChatManager when the channel is removed.


getActions

javax.swing.Action[] getActions()
Returns an array of actions that can be performed on the channel.


getCommands

Command[] getCommands()
Returns an array of commands that can be executed on the channel.


getIcon

javax.swing.Icon getIcon()
Returns a 16x16 icon that is displayed in the tab title.


getPeerActions

javax.swing.Action[] getPeerActions(Peer peer)
Returns an array of peer specific actions.

This can be used to implement channel operations like "op".


getProvider

ChatProvider getProvider()
Returns a reference to the chat provider.

Returns:
null, if the channel has no provider; the provider, otherwise

getPeers

Peer[] getPeers()
Returns an array of peers that have joined this channel.


getPrefix

java.lang.String getPrefix(Peer peer)
Returns a name prefix for peer. This can be used to display mods.


isLocal

boolean isLocal(Peer peer)
Returns true, if peer is the local peer. XNap does not beep if messages are received from local peers.


isJoined

boolean isJoined()
Returns true, if the channel is joined.


removeChannelListener

void removeChannelListener(ChannelListener listener)
Removes listener from the channel.


sendMessage

void sendMessage(java.lang.String message)
Sends a message to this channel.



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