examples.chat
Class GuiClientImpl

java.lang.Object
  extended by examples.chat.GuiClientImpl
All Implemented Interfaces:
Chat

public class GuiClientImpl
extends java.lang.Object
implements Chat

This component acts like a proxy for the Chat service. This is necessary because SwingAppFramework has its own instantiation mechanism, confusing with the SCA scope/instantiation mechanism.

Author:
Christophe Demarey.

Field Summary
 Chat chatService
           
 
Constructor Summary
GuiClientImpl()
           
 
Method Summary
 void connect()
          Initialize a connection with the chat server.
 void disconnect()
          Leave the chat.
 java.lang.String getMessages()
          Get all messages received by the chat server.
 void sendMessage(java.lang.String pseudo, java.lang.String msg)
          Send a message to the chat server
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

chatService

public Chat chatService
Constructor Detail

GuiClientImpl

public GuiClientImpl()
Method Detail

connect

public void connect()
Description copied from interface: Chat
Initialize a connection with the chat server.

Specified by:
connect in interface Chat
See Also:
examples.chat.Chat#connect(String)

disconnect

public void disconnect()
Description copied from interface: Chat
Leave the chat.

Specified by:
disconnect in interface Chat
See Also:
Chat.disconnect()

getMessages

public java.lang.String getMessages()
Description copied from interface: Chat
Get all messages received by the chat server.

Specified by:
getMessages in interface Chat
Returns:
The list of received messages.
See Also:
Chat.getMessages()

sendMessage

public void sendMessage(java.lang.String pseudo,
                        java.lang.String msg)
Description copied from interface: Chat
Send a message to the chat server

Specified by:
sendMessage in interface Chat
Parameters:
pseudo - - The pseudo of the sender.
msg - - The message to send.
See Also:
examples.chat.Chat#sendMessage(String)


Copyright © 2010 OW2 Consortium. All Rights Reserved.