|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Channel
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 |
---|
static final long AWAY_MESSAGE_INTERVAL
Method Detail |
---|
void addChannelListener(ChannelListener listener)
listener
to the channel.
void close()
ChatManager
when the channel is removed.
javax.swing.Action[] getActions()
Command[] getCommands()
javax.swing.Icon getIcon()
javax.swing.Action[] getPeerActions(Peer peer)
This can be used to implement channel operations like "op".
ChatProvider getProvider()
Peer[] getPeers()
java.lang.String getPrefix(Peer peer)
peer
. This can be used to
display mods.
boolean isLocal(Peer peer)
peer is the local peer. XNap does
not beep if messages are received from local peers.
boolean isJoined()
void removeChannelListener(ChannelListener listener)
listener
from the channel.
void sendMessage(java.lang.String message)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |