|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.microedition.midlet.MIDlet
example.http.HttpTest
public class HttpTest
An example MIDlet to fetch a page using an HttpConnection. Refer to the startApp, pauseApp, and destroyApp methods so see how it handles each requested transition. Note: if you run this inside POSE using a multi-homed PC (with more than one network connections), POSE doesn't know how to resolve host names not connected to the first network card. To solve this, add a line like this in your c:/WINNT/system32/drivers/etc/hosts file: 204.71.202.160 www.yahoo.com
Constructor Summary | |
---|---|
HttpTest()
Initialize the MIDlet with a handle to the current display |
Method Summary | |
---|---|
(package private) void |
addScreen()
Add another screen. |
(package private) void |
chooseScreen()
Pick a screen. |
void |
commandAction(javax.microedition.lcdui.Command c,
javax.microedition.lcdui.Displayable s)
Respond to commands, including exit |
(package private) static void |
DEBUG(java.lang.String s)
Debug output routine. |
void |
destroyApp(boolean unconditional)
Destroy must cleanup everything. |
(package private) void |
mainScreen()
Display the main screen. |
void |
pauseApp()
Pause signals the thread to stop by clearing the thread field. |
void |
run()
Perform the current command set by the method commandAction. |
(package private) void |
setCommands(javax.microedition.lcdui.Displayable d,
boolean islist)
Set the funtion to perform based on commands selected. |
void |
startApp()
Start creates the thread to do the timing. |
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 |
Constructor Detail |
---|
public HttpTest()
Method Detail |
---|
static final void DEBUG(java.lang.String s)
s
- string to be printed.public void startApp()
startApp
in class javax.microedition.midlet.MIDlet
void mainScreen()
void chooseScreen()
void addScreen()
void setCommands(javax.microedition.lcdui.Displayable d, boolean islist)
d
- Displayable objectislist
- flag to indicate list processingpublic void pauseApp()
pauseApp
in class javax.microedition.midlet.MIDlet
public void destroyApp(boolean unconditional)
destroyApp
in class javax.microedition.midlet.MIDlet
unconditional
- Flag to indicate that forced shutdown
is requestedpublic void commandAction(javax.microedition.lcdui.Command c, javax.microedition.lcdui.Displayable s)
commandAction
in interface javax.microedition.lcdui.CommandListener
c
- command to performs
- Screen displayable objectpublic void run()
run
in interface java.lang.Runnable
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |