org.xnap.plugin.joscar
Class JOscarChannel

java.lang.Object
  extended by org.xnap.chat.AbstractChannel
      extended by org.xnap.plugin.joscar.JOscarChannel
All Implemented Interfaces:
java.util.EventListener, JOscarLib.Integration.Event.MessagingListener, JOscarLib.Integration.Event.StatusListener, Channel, ChannelInfo

public class JOscarChannel
extends AbstractChannel
implements JOscarLib.Integration.Event.MessagingListener, JOscarLib.Integration.Event.StatusListener


Field Summary
 
Fields inherited from class org.xnap.chat.AbstractChannel
cs
 
Fields inherited from interface org.xnap.chat.Channel
AWAY_MESSAGE_INTERVAL
 
Constructor Summary
JOscarChannel(JOscarPeer peer)
          Constructs a joscar private channel.
 
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.
 JOscarPeer getJOscarPeer()
          For now a channel is uniquely identified by the peer it's chatting to.
 javax.swing.Action[] getPeerActions(Peer peer)
          Returns an array of peer specific actions.
 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 onIncomingMessage(JOscarLib.Integration.Event.IncomingMessageEvent e)
          Implements the OscarListener interface.
 void onIncomingUrl(JOscarLib.Integration.Event.IncomingUrlEvent e)
          Implements the OscarListener interface.
 void onIncomingUser(JOscarLib.Integration.Event.IncomingUserEvent e)
          Implements the OscarListener interface.
 void onOffgoingUser(JOscarLib.Integration.Event.OffgoingUserEvent e)
          Implements the OscarListener interface.
 void onOfflineMessage(JOscarLib.Integration.Event.OfflineMessageEvent e)
          Implements the OscarListener interface.
 void sendMessage(java.lang.String message)
          Sends a message to this channel.
 
Methods inherited from class org.xnap.chat.AbstractChannel
actionMessageReceived, add, addChannelListener, errorReceived, getCommands, getIcon, getName, getPeerCount, getPeers, 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
 

Constructor Detail

JOscarChannel

public JOscarChannel(JOscarPeer peer)
Constructs a joscar private channel.

Parameters:
peer - the peer the user can talk to
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

getJOscarPeer

public JOscarPeer getJOscarPeer()
For now a channel is uniquely identified by the peer it's chatting to.


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

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

getProvider

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

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

isJoined

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

Specified by:
isJoined in interface Channel

isLocal

public boolean isLocal(Peer peer)
Description copied from interface: Channel
Returns true, if peer is the local peer. XNap does not beep if messages are received from local peers.

Specified by:
isLocal in interface Channel

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

onIncomingMessage

public void onIncomingMessage(JOscarLib.Integration.Event.IncomingMessageEvent e)
Implements the OscarListener interface.

Specified by:
onIncomingMessage in interface JOscarLib.Integration.Event.MessagingListener

onIncomingUrl

public void onIncomingUrl(JOscarLib.Integration.Event.IncomingUrlEvent e)
Implements the OscarListener interface.

Specified by:
onIncomingUrl in interface JOscarLib.Integration.Event.MessagingListener

onIncomingUser

public void onIncomingUser(JOscarLib.Integration.Event.IncomingUserEvent e)
Implements the OscarListener interface.

Specified by:
onIncomingUser in interface JOscarLib.Integration.Event.StatusListener

onOffgoingUser

public void onOffgoingUser(JOscarLib.Integration.Event.OffgoingUserEvent e)
Implements the OscarListener interface.

Specified by:
onOffgoingUser in interface JOscarLib.Integration.Event.StatusListener

onOfflineMessage

public void onOfflineMessage(JOscarLib.Integration.Event.OfflineMessageEvent e)
Implements the OscarListener interface.

Specified by:
onOfflineMessage in interface JOscarLib.Integration.Event.MessagingListener


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