org.xnap.plugin.opennap.net.msg
Class MessageHandler

java.lang.Object
  extended by org.xnap.plugin.opennap.net.msg.MessageHandler

public class MessageHandler
extends java.lang.Object


Constructor Summary
MessageHandler()
           
 
Method Summary
 void die()
           
 PrivateOpenNapChannel getPrivateChannel(OpenNapUser user)
           
 void handle(ServerMessage msg)
          Handles message itself first and then sends it to all listeners.
 void removePrivateChannel(PrivateOpenNapChannel pc)
           
static void send(ClientMessage msg)
           
static void send(OpenNapServer server, ClientMessage msg)
           
static void subscribe(int type, MessageListener listener)
           
static void unsubscribe(int type, MessageListener listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageHandler

public MessageHandler()
Method Detail

send

public static void send(OpenNapServer server,
                        ClientMessage msg)
See Also:
MessageSender.send(OpenNapServer, OvernetClientMessage)

send

public static void send(ClientMessage msg)
See Also:
MessageSender.send(OvernetClientMessage)

die

public void die()

handle

public void handle(ServerMessage msg)
Handles message itself first and then sends it to all listeners. A listener can consume the message to prevent other listeners from getting it.


getPrivateChannel

public PrivateOpenNapChannel getPrivateChannel(OpenNapUser user)

removePrivateChannel

public void removePrivateChannel(PrivateOpenNapChannel pc)

subscribe

public static void subscribe(int type,
                             MessageListener listener)

unsubscribe

public static void unsubscribe(int type,
                               MessageListener listener)


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