|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.microedition.midlet.MIDlet
example.cbs.CBSReceive
public class CBSReceive
An example MIDlet displays text from a CBS MessageConnection
Field Summary | |
---|---|
(package private) javax.wireless.messaging.MessageConnection |
cbsconn
CBS message connection for inbound text messages. |
(package private) java.lang.String |
cbsMessageID
The Message Identifier of the CBS messages we're listening for |
(package private) java.lang.String[] |
connections
Connections detected at start up. |
(package private) javax.microedition.lcdui.Display |
display
current display. |
(package private) boolean |
done
Flag to signal end of processing. |
(package private) javax.microedition.lcdui.Command |
exitCommand
user interface command for indicating Exit request. |
(package private) javax.wireless.messaging.Message |
msg
Current message read from the network. |
(package private) javax.microedition.lcdui.Alert |
receivedMessage
Alert displaying the contents of the received message |
(package private) java.lang.Thread |
thread
instance of a thread for asynchronous networking and user interface. |
(package private) javax.microedition.lcdui.Alert |
waiting
user interface text box for the "waiting" message. |
Constructor Summary | |
---|---|
CBSReceive()
Initialize the MIDlet with the current display object and graphical components. |
Method Summary | |
---|---|
void |
commandAction(javax.microedition.lcdui.Command c,
javax.microedition.lcdui.Displayable s)
Respond to commands, including exit |
void |
destroyApp(boolean unconditional)
Destroy must cleanup everything. |
void |
notifyIncomingMessage(javax.wireless.messaging.MessageConnection conn)
Notification that a message arrived. |
void |
pauseApp()
Pause signals the thread to stop by clearing the thread field. |
void |
run()
Message reading thread. |
void |
startApp()
Start creates the thread to do the MessageConnection receive text. |
Methods inherited from class javax.microedition.midlet.MIDlet |
---|
checkPermission, getAppProperty, notifyDestroyed, notifyPaused, platformRequest, resumeRequest |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
javax.microedition.lcdui.Command exitCommand
javax.microedition.lcdui.Alert waiting
javax.microedition.lcdui.Display display
java.lang.Thread thread
java.lang.String[] connections
boolean done
java.lang.String cbsMessageID
javax.wireless.messaging.MessageConnection cbsconn
javax.wireless.messaging.Message msg
javax.microedition.lcdui.Alert receivedMessage
Constructor Detail |
---|
public CBSReceive()
Method Detail |
---|
public void startApp()
startApp
in class javax.microedition.midlet.MIDlet
public void notifyIncomingMessage(javax.wireless.messaging.MessageConnection conn)
notifyIncomingMessage
in interface javax.wireless.messaging.MessageListener
conn
- the connection with messages availablepublic void run()
run
in interface java.lang.Runnable
public void pauseApp()
pauseApp
in class javax.microedition.midlet.MIDlet
public void destroyApp(boolean unconditional)
destroyApp
in class javax.microedition.midlet.MIDlet
unconditional
- true if a forced shutdown was requestedpublic void commandAction(javax.microedition.lcdui.Command c, javax.microedition.lcdui.Displayable s)
commandAction
in interface javax.microedition.lcdui.CommandListener
c
- user interface command requesteds
- screen object initiating the request
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |