pl.mn.communicator
Interface IMessageService

All Known Implementing Classes:
DefaultMessageService

public interface IMessageService

The client should use this interface if it is interested in sending message to Gadu-Gadu server or if it wants to be interested in message related events.

Created on 2004-11-27

Version:
$Id: IMessageService.java,v 1.1 2005/11/05 23:34:52 winnetou25 Exp $
Author:
Mateusz Szczap

Method Summary
 void addMessageListener(MessageListener messageListener)
          Adds MessageListener object to the list that will be notified of message related events.
 IGroupChat createGroupChat()
           
 IGroupChat createGroupChat(int[] recipientUins)
           
 ISingleChat createSingleChat(int recipientUin)
          Create chat with some Gadu-Gadu user.
 void removeMessageListener(MessageListener messageListener)
          Remove MessageListener from the list that will be notified of message related events.
 void sendMessage(IOutgoingMessage outgoingMessage)
          Invocation of this method sends the message to the Gadu-Gadu server.
 

Method Detail

sendMessage

void sendMessage(IOutgoingMessage outgoingMessage)
                 throws GGException
Invocation of this method sends the message to the Gadu-Gadu server.

Parameters:
outgoingMessage - the message that will be sent to the server.
Throws:
GGException - if there is an error while sending message to server.
GGSessionException - if user is not logged in.
java.lang.NullPointerException - if the outgoingMessage is null.

createSingleChat

ISingleChat createSingleChat(int recipientUin)
Create chat with some Gadu-Gadu user.

Parameters:
recipientUin - the Gadu-Gadu number of the user one wants to chat with
Returns:
chat object that represents chat with some user.

createGroupChat

IGroupChat createGroupChat()

createGroupChat

IGroupChat createGroupChat(int[] recipientUins)

addMessageListener

void addMessageListener(MessageListener messageListener)
Adds MessageListener object to the list that will be notified of message related events.

Parameters:
messageListener - the MessageListener instance to be notified.
Throws:
java.lang.NullPointerException - if the messageListener is null.
See Also:
MessageListener

removeMessageListener

void removeMessageListener(MessageListener messageListener)
Remove MessageListener from the list that will be notified of message related events.

Parameters:
messageListener - the MessageListener instance that will no longer be notified.
Throws:
java.lang.NullPointerException - if the messageListener is null.
See Also:
MessageListener


Copyright 2004-2004-2005 SourceForge.net. All Rights Reserved.