com.nokia.mid.messaging
Interface MessageListener


public interface MessageListener

The MessageListener interface is an interface that can be implemented by a class of the application to get notified of incoming messages.

When an incoming message arrives, the notifyIncomingMessage() method gets called. The application can then retrieve the message using the receive() method of the MessageConnection.

This listener mechanism allows applications to receive incoming messages without needing to have a thread blocked in the receive() method call.


Method Summary
 void notifyIncomingMessage(MessageConnection conn)
          This method will be called by the platform when an incoming message arrives to a MessageConnection where the application has registered this listener object.
 

Method Detail

notifyIncomingMessage

public void notifyIncomingMessage(MessageConnection conn)

This method will be called by the platform when an incoming message arrives to a MessageConnection where the application has registered this listener object.

This method is called once per each incoming message to that MessageConnection.

NOTE: The implementation of this method must return quickly and must not perform any extensive operations. The application should not receive and handle the message during this method call but this should only act as a trigger to start that activity in the application's own thread.

Parameters:
conn - The MessageConnection where the incoming message has arrived

forum.nokia.com/java

Copyright (c) 2002 Nokia Mobile Phones. All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc.