org.xnap.plugin.opennap.net
Class PrivateOpenNapChannel

java.lang.Object
  extended by org.xnap.chat.AbstractChannel
      extended by org.xnap.plugin.opennap.net.OpenNapAbstractChannel
          extended by org.xnap.plugin.opennap.net.PrivateOpenNapChannel
All Implemented Interfaces:
Channel, ChannelInfo, OpenNapConsole, ExceptionListener, MessageListener

public class PrivateOpenNapChannel
extends OpenNapAbstractChannel
implements MessageListener

Manages a list of channels.


Field Summary
static int ERROR_WAIT
          Time to wait for global error message.
 
Fields inherited from class org.xnap.plugin.opennap.net.OpenNapAbstractChannel
server
 
Fields inherited from class org.xnap.chat.AbstractChannel
cs
 
Fields inherited from interface org.xnap.chat.Channel
AWAY_MESSAGE_INTERVAL
 
Constructor Summary
PrivateOpenNapChannel(OpenNapUser user)
           
 
Method Summary
 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 null.
 javax.swing.Icon getIcon()
          Returns null.
 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.
 ChatProvider getProvider()
          Returns a reference to the chat provider.
 OpenNapUser getUser()
           
 boolean isJoined()
          Returns true, if the channel is joined.
 void join()
           
 void messageReceived(ServerMessage msg)
           
 void messageReceived(java.lang.String message)
           
 void sendMessage(java.lang.String message)
          Sends a message to this channel.
 
Methods inherited from class org.xnap.plugin.opennap.net.OpenNapAbstractChannel
exceptionThrown, getServer, isLocal, println
 
Methods inherited from class org.xnap.chat.AbstractChannel
actionMessageReceived, add, addChannelListener, errorReceived, getName, getPeerCount, getPrefix, getTopic, infoReceived, joined, messageReceived, parted, peerChanged, remove, removeChannelListener, setTopic, topicChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERROR_WAIT

public static final int ERROR_WAIT
Time to wait for global error message.

See Also:
Constant Field Values
Constructor Detail

PrivateOpenNapChannel

public PrivateOpenNapChannel(OpenNapUser user)
Method Detail

close

public void close()
Description copied from interface: Channel
Invoked by the ChatManager when the channel is removed.

Specified by:
close in interface Channel

getActions

public javax.swing.Action[] getActions()
Description copied from interface: Channel
Returns an array of actions that can be performed on the channel.

Specified by:
getActions in interface Channel

getCommands

public Command[] getCommands()
Description copied from class: AbstractChannel
Returns null.

Specified by:
getCommands in interface Channel
Overrides:
getCommands in class AbstractChannel

getIcon

public javax.swing.Icon getIcon()
Description copied from class: AbstractChannel
Returns null.

Specified by:
getIcon in interface Channel
Overrides:
getIcon in class AbstractChannel
See Also:
OpenNapPlugin.ICON_16.

getPeerActions

public javax.swing.Action[] getPeerActions(Peer peer)
Description copied from interface: Channel
Returns an array of peer specific actions.

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

Specified by:
getPeerActions in interface Channel

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
Overrides:
getPeers in class AbstractChannel

getProvider

public ChatProvider getProvider()
Description copied from interface: Channel
Returns a reference to the chat provider.

Specified by:
getProvider in interface Channel
Overrides:
getProvider in class OpenNapAbstractChannel
Returns:
null, if the channel has no provider; the provider, otherwise

getUser

public OpenNapUser getUser()

isJoined

public boolean isJoined()
Description copied from interface: Channel
Returns true, if the channel is joined.

Specified by:
isJoined in interface Channel

join

public void join()

messageReceived

public void messageReceived(java.lang.String message)

sendMessage

public void sendMessage(java.lang.String message)
Description copied from interface: Channel
Sends a message to this channel.

Specified by:
sendMessage in interface Channel

messageReceived

public void messageReceived(ServerMessage msg)
Specified by:
messageReceived in interface MessageListener


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