Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.msn
Class EventManager

java.lang.Object
  extended by net.sf.jml.net.SessionAdapter
      extended by net.java.sip.communicator.impl.protocol.msn.EventManager
All Implemented Interfaces:
net.sf.jml.net.SessionListener

public class EventManager
extends net.sf.jml.net.SessionAdapter

Manager which listens for changing of the contact list and fires some events.

Author:
Damian Minkov

Constructor Summary
EventManager(ProtocolProviderServiceMsnImpl msnProvider, net.sf.jml.impl.BasicMessenger msnMessenger)
          Initializes a new EventManager instance which is to manage the events of a specific BasicMessenger as part of its operation for the purposes of a specific ProtocolProviderServiceMsnImpl.
 
Method Summary
 void addModificationListener(MsnContactListEventListener listener)
          Adds listener of the modification fired events
 void messageReceived(net.sf.jml.net.Session session, net.sf.jml.net.Message message)
          Called from the underling lib when message is received from the server
 void messageSent(net.sf.jml.net.Session session, net.sf.jml.net.Message message)
          Called from the underling lib when message is sent to the server
 void removeModificationListener(MsnContactListEventListener listener)
          Removes listener of the modification fired events
 void sessionTimeout(net.sf.jml.net.Session socketSession)
          Called when there was timeout on the connection.
 
Methods inherited from class net.sf.jml.net.SessionAdapter
exceptionCaught, sessionClosed, sessionEstablished, sessionIdle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventManager

public EventManager(ProtocolProviderServiceMsnImpl msnProvider,
                    net.sf.jml.impl.BasicMessenger msnMessenger)
Initializes a new EventManager instance which is to manage the events of a specific BasicMessenger as part of its operation for the purposes of a specific ProtocolProviderServiceMsnImpl.

Parameters:
msnProvider - the ProtocolProviderServiceMsnImpl which is the creator of the new instance
msnMessenger - the BasicMessenger which is to have its events managed by the new instance
Method Detail

addModificationListener

public void addModificationListener(MsnContactListEventListener listener)
Adds listener of the modification fired events

Parameters:
listener - the modification listener we're adding

removeModificationListener

public void removeModificationListener(MsnContactListEventListener listener)
Removes listener of the modification fired events

Parameters:
listener - EventListener

messageSent

public void messageSent(net.sf.jml.net.Session session,
                        net.sf.jml.net.Message message)
                 throws Exception
Called from the underling lib when message is sent to the server

Specified by:
messageSent in interface net.sf.jml.net.SessionListener
Overrides:
messageSent in class net.sf.jml.net.SessionAdapter
Parameters:
session - Session
message - Message
Throws:
Exception

messageReceived

public void messageReceived(net.sf.jml.net.Session session,
                            net.sf.jml.net.Message message)
                     throws Exception
Called from the underling lib when message is received from the server

Specified by:
messageReceived in interface net.sf.jml.net.SessionListener
Overrides:
messageReceived in class net.sf.jml.net.SessionAdapter
Parameters:
session - Session
message - Message
Throws:
Exception

sessionTimeout

public void sessionTimeout(net.sf.jml.net.Session socketSession)
                    throws Exception
Called when there was timeout on the connection.

Specified by:
sessionTimeout in interface net.sf.jml.net.SessionListener
Overrides:
sessionTimeout in class net.sf.jml.net.SessionAdapter
Parameters:
socketSession -
Throws:
Exception

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.