|
Luky Library - 4.1.1 (20061117-1148) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectluky.serverSimple.Client
luky.serverSimple.ClientExtended
public class ClientExtended
The ClientExtended class extends the Client class and is created to make a
general listner for servers which communicates with MyEventListners
Revision Changes :
![]() |
![]() |
Field Summary | |
---|---|
protected static int |
IDLE
|
protected EventListenerList |
listenerList
|
protected String |
name
|
protected static int |
RECONNECTING
|
protected static int |
RUNNING
|
protected static int |
STARTING
|
protected int |
status
|
protected static int |
STOPPING
|
Fields inherited from class luky.serverSimple.Client |
---|
connected, reader, writer |
Constructor Summary | |
---|---|
ClientExtended(String ip,
String port,
int interval)
constructor, takes ip number and portnumber of the server to connect to and the watchdog interval < 0 means disable |
Method Summary | |
---|---|
void |
addMyEventListener(MyEventListener listener)
This methods allows classes to register for MyEvents |
protected void |
fireMyEvent(MyEvent evt)
This method is used to fire MyEvents |
int |
handleCommError()
comm error occured re-initialize and report to listners |
void |
myEventOccurred(MyEvent evt)
This method gets called by the Watchdog |
void |
removeMyEventListener(MyEventListener listener)
This methods allows classes to unregister for MyEvents |
void |
run()
main loop of the client, override with more sensible actions currently listens to input and fires each line as an event |
void |
start()
This method starts the client in a seperate thread |
void |
stop()
This method stops the client |
Methods inherited from class luky.serverSimple.Client |
---|
getLine, getList, openConnection, sendCommand |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String name
protected EventListenerList listenerList
protected static final int IDLE
protected static final int STARTING
protected static final int RUNNING
protected static final int RECONNECTING
protected static final int STOPPING
protected int status
Constructor Detail |
---|
public ClientExtended(String ip, String port, int interval)
Method Detail |
---|
public void addMyEventListener(MyEventListener listener)
public void removeMyEventListener(MyEventListener listener)
protected void fireMyEvent(MyEvent evt)
public void myEventOccurred(MyEvent evt)
myEventOccurred
in interface MyEventListener
public void start()
public void stop()
public int handleCommError()
public void run()
run
in interface Runnable
|
Luky Library - 4.1.1 (20061117-1148) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |