|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectClientNetworkThread
Works in a producer consumer relationship to the grpical processing Thread. This means that when graphical processing is finished and one waits for network input this Thread is woken, and parses the following network message before releaving control to graphic processing and sleeps indefineltely. Created by IntelliJ IDEA. User: ofsdahl Date: 10.jan.2007 : 15:29:56 To change this template use File | Settings | File Templates.
Field Summary | |
protected boolean |
alive
|
protected java.io.InputStream |
is
|
protected LeGaMidlet |
lega
|
protected java.lang.Thread |
networkThread
|
protected java.io.OutputStream |
os
|
protected int |
protocolState
|
java.lang.String |
received
|
protected SocketConnection |
sc
|
protected boolean |
stringBuffered
|
Constructor Summary | |
ClientNetworkThread(LeGaMidlet lega)
Initialize variables |
Method Summary | |
void |
close()
Closes connections from the client side. |
java.lang.String |
receive()
Strips the prtocol header and signal chars off the message. |
void |
run()
Alternates between interpreting network input and sleeping. |
void |
send(java.lang.String str)
Sends the provided String to the server. |
void |
wakeMe()
Notify the object monitor that it is time to wake up and start processing network input. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected LeGaMidlet lega
protected java.io.OutputStream os
protected java.io.InputStream is
protected SocketConnection sc
protected int protocolState
protected boolean stringBuffered
public java.lang.String received
protected java.lang.Thread networkThread
protected boolean alive
Constructor Detail |
public ClientNetworkThread(LeGaMidlet lega)
lega
- Midlet classMethod Detail |
public void run()
run
in interface java.lang.Runnable
public void wakeMe()
public java.lang.String receive()
public void close() throws java.io.IOException
java.io.IOException
public void send(java.lang.String str)
str
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |