|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectluky.serverSimple.Client
iCMS.masterd.CmsdClient
public class CmsdClient
The CmsdClient class extends the Client class and is created to make a general listner for servers which communicates with MyEventListners
![]() |
![]() |
![]() |
![]() |
Field Summary | |
---|---|
protected boolean |
isReconnecting
|
protected boolean |
isRunning
|
protected EventListenerList |
listenerList
|
protected String |
name
|
protected String |
symbolicName
|
Fields inherited from class luky.serverSimple.Client |
---|
connected, reader, writer |
Constructor Summary | |
---|---|
CmsdClient(String ip,
int port,
String name,
String symbolicName)
constructor, takes ip number and portnumber of the server to connect to the name shows up in the debug output |
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 |
String |
getIp()
returns the Ip of this client |
String |
getLine(String cmd)
overrides getLine, checks if running or reconnecting |
Vector |
getList(String cmd)
overrides getList, checks if running or reconnecting |
String |
getName()
get's the symbolic name of this clients endpoint |
int |
getPort()
returns the port of this client |
int |
handleCommError()
comm error occured re-initialize and report to listners |
boolean |
isReconnecting()
isReconnecting |
void |
reconnect()
This method starts the client in a seperate thread and tries to open the connection |
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, the thread will listen to input and not repond to any cmds anymore ! |
void |
stop()
This method stops the client |
Methods inherited from class luky.serverSimple.Client |
---|
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 String symbolicName
protected boolean isRunning
protected boolean isReconnecting
protected EventListenerList listenerList
Constructor Detail |
---|
public CmsdClient(String ip, int port, String name, String symbolicName)
Method Detail |
---|
public String getName()
public Vector getList(String cmd)
getList
in class Client
public String getLine(String cmd)
getLine
in class Client
public String getIp()
public int getPort()
public void addMyEventListener(MyEventListener listener)
public void removeMyEventListener(MyEventListener listener)
protected void fireMyEvent(MyEvent evt)
public void reconnect()
public void start()
public void stop()
public boolean isReconnecting()
public int handleCommError()
public void run()
run
in interface Runnable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |