|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.microedition.midlet.MIDlet
mymobilesite.controller.Controller
public class Controller
The Controller class is the application's main class and controls the program execution. It calls the other classes and handles all user and program (exceptions) events.
Field Summary | |
---|---|
private int |
chosenprovider
|
private GUI |
gui
|
private java.lang.String |
idpName
|
private LibertyProtocol |
libProtocol
|
private MessageException |
me
|
private java.lang.String[] |
providerList
|
private boolean |
retrivedProviders
|
private Service[] |
serviceList
|
private java.lang.String |
username
|
Constructor Summary | |
---|---|
Controller()
The Controller constructor. |
Method Summary | |
---|---|
void |
contactWsp(int index)
This method request the LibertyProtocol to start retrieving services from the chosen provider. |
protected void |
destroyApp(boolean unconditional)
|
void |
encounteredException(int currentState,
MessageException me)
Calls the GUI to display an appropriate error message. |
java.lang.String |
getIdpName()
|
java.lang.String[] |
getProviderList()
|
Service[] |
getServices()
|
protected void |
pauseApp()
This application does not support pausing the application and calls destroyApp. |
void |
resultsReady(int state,
java.lang.Object result)
Receives the results from the LibertyProtocol and handles them according to the state. |
void |
retry()
This method is called by the GUI to show that the user has requested the application to try again the previous action which failed. |
protected void |
startApp()
Starts the application. |
void |
startLogin(java.lang.String un,
java.lang.String pwd)
This method is called by the GUI when the user has pressed the button to start login. |
void |
userAborted()
This method is used by the GUI to alert the controller that the user pressed back while waiting. |
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 |
---|
private Service[] serviceList
private java.lang.String[] providerList
private GUI gui
private LibertyProtocol libProtocol
private java.lang.String username
private MessageException me
private int chosenprovider
private boolean retrivedProviders
private java.lang.String idpName
Constructor Detail |
---|
public Controller()
Method Detail |
---|
public java.lang.String getIdpName()
public Service[] getServices()
public java.lang.String[] getProviderList()
public void startLogin(java.lang.String un, java.lang.String pwd)
un
- String The username which was entered into the login screen.pwd
- String The password which was entered into the login screen.public void contactWsp(int index)
index
- int The index in the list of providers which the user has chosen.public void userAborted()
waitingState
- int The waiting window which the back command was called from.public void retry()
protected void startApp() throws javax.microedition.midlet.MIDletStateChangeException
startApp
in class javax.microedition.midlet.MIDlet
javax.microedition.midlet.MIDletStateChangeException
MIDlet.startApp()
protected void pauseApp()
pauseApp
in class javax.microedition.midlet.MIDlet
MIDlet.pauseApp()
protected void destroyApp(boolean unconditional) throws javax.microedition.midlet.MIDletStateChangeException
destroyApp
in class javax.microedition.midlet.MIDlet
javax.microedition.midlet.MIDletStateChangeException
MIDlet.destroyApp(boolean)
public void resultsReady(int state, java.lang.Object result)
resultsReady
in interface LibertyProtocolListener
state
- int The state which the LibertyProtocol is currently in.result
- Object The result from the LibertyProtocol to the listener.LibertyProtocolListener.resultsReady(int, java.lang.Object)
public void encounteredException(int currentState, MessageException me)
encounteredException
in interface LibertyProtocolListener
currentState
- int The state which the LibertyProtocol is currently in.me
- MessageException The MessageException that the LibertyProtocol encountered.LibertyProtocolListener.encounteredException(int,
mymobilesite.communication.MessageException)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |