jtge.sample.chat.client.core
Class ClientFacade

java.lang.Object
  extended byjtge.sample.chat.client.core.ClientFacade
All Implemented Interfaces:
jtge.engine.net.IClient, jtge.engine.net.IClosable, IController

public class ClientFacade
extends java.lang.Object
implements IController

Provides a client facade.

Version:
$Revision: 1.3 $ $Date: 2005/09/07 23:34:27 $
Author:
Mathieu Champlon

Constructor Summary
ClientFacade()
          Create a client.
 
Method Summary
 void close()
          
 void login(java.lang.String name)
          Log in with a given nickname.
 void open(java.lang.String host, int port)
          
 void register(jtge.engine.security.ILoginView view)
          Register a view to receive login events.
 void register(IMessageView view)
          Register a view to receive message events.
 void register(jtge.engine.io.IStatusObserver view)
          Register a view to receive connection events.
 void send(java.lang.String message)
          Send a message to the server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientFacade

public ClientFacade()
Create a client.

Method Detail

register

public final void register(jtge.engine.io.IStatusObserver view)
Register a view to receive connection events.

Specified by:
register in interface IController
Parameters:
view - the view to register

register

public final void register(IMessageView view)
Register a view to receive message events.

Specified by:
register in interface IController
Parameters:
view - the view to register

register

public final void register(jtge.engine.security.ILoginView view)
Register a view to receive login events.

Specified by:
register in interface IController
Parameters:
view - the view to register

open

public final void open(java.lang.String host,
                       int port)

Specified by:
open in interface jtge.engine.net.IClient

login

public final void login(java.lang.String name)
Log in with a given nickname.

Specified by:
login in interface IController
Parameters:
name - the nickname to use

send

public final void send(java.lang.String message)
Send a message to the server.

Specified by:
send in interface IController
Parameters:
message - the content of the message

close

public final void close()

Specified by:
close in interface jtge.engine.net.IClosable


Copyright © 2003-2005 . All Rights Reserved.