|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.microedition.midlet.MIDlet
org.openuat.apps.j2me.ManualAuthentication
public class ManualAuthentication
This MIDlet demonstrates all three possible options for out-of-band peer verification when using the UACAP protocol and "manual" authentication.
| Field Summary | |
|---|---|
static javax.bluetooth.UUID |
SERVICE_UUID
Manual authentication service identifier. |
| Fields inherited from interface org.openuat.util.BluetoothPeerManager.PeerEventsListener |
|---|
DEVICE_NOT_REACHABLE, SEARCH_ABORTED, SEARCH_COMPLETE, SEARCH_FAILED |
| Constructor Summary | |
|---|---|
ManualAuthentication()
|
|
| Method Summary | |
|---|---|
void |
AuthenticationFailure(java.lang.Object sender,
java.lang.Object remote,
java.lang.Exception e,
java.lang.String msg)
Upon authentication failure, an exception might have been thrown and a message might have been created. |
void |
AuthenticationProgress(java.lang.Object sender,
java.lang.Object remote,
int cur,
int max,
java.lang.String msg)
This event is raised during the authentication protocol to indicate progress. |
boolean |
AuthenticationStarted(java.lang.Object sender,
java.lang.Object remote)
This event is raised when the authentication protocol is started, to indicate that further events might follow. |
void |
AuthenticationSuccess(java.lang.Object sender,
java.lang.Object remote,
java.lang.Object result)
Upon successful authentication, the established shared key can be used with the remote host. |
void |
commandAction(javax.microedition.lcdui.Command com,
javax.microedition.lcdui.Displayable dis)
|
void |
destroyApp(boolean unconditional)
|
void |
do_alert(java.lang.String msg,
int time_out)
|
void |
inquiryCompleted(java.util.Vector newDevices)
This method is called when the inquiry has been completed (either started as a one-shot process or periodically by the background inquiry. |
void |
pauseApp()
|
void |
serviceSearchCompleted(javax.bluetooth.RemoteDevice remoteDevice,
java.util.Vector services,
int errorReason)
This method is called when the search for the services of a specific remote device has completed. |
void |
startApp()
|
| 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 |
|---|
public static final javax.bluetooth.UUID SERVICE_UUID
| Constructor Detail |
|---|
public ManualAuthentication()
| Method Detail |
|---|
public void startApp()
startApp in class javax.microedition.midlet.MIDlet
public void commandAction(javax.microedition.lcdui.Command com,
javax.microedition.lcdui.Displayable dis)
commandAction in interface javax.microedition.lcdui.CommandListener
public void do_alert(java.lang.String msg,
int time_out)
public void pauseApp()
pauseApp in class javax.microedition.midlet.MIDletpublic void destroyApp(boolean unconditional)
destroyApp in class javax.microedition.midlet.MIDletpublic void inquiryCompleted(java.util.Vector newDevices)
BluetoothPeerManager.PeerEventsListener
inquiryCompleted in interface BluetoothPeerManager.PeerEventsListenernewDevices - This vector contains the list of new devices that
have been discovered since the last inquiry
completed. If no new devices have been found
during this inquiry, the vector is empty. Elements
of the vector are of type RemoteDevice.to get a list of devices
discovered so far.
public void serviceSearchCompleted(javax.bluetooth.RemoteDevice remoteDevice,
java.util.Vector services,
int errorReason)
BluetoothPeerManager.PeerEventsListener
serviceSearchCompleted in interface BluetoothPeerManager.PeerEventsListenerremoteDevice - The remote device for which new services have
been searched for.services - The list of services of the remote device. Elements
of the vector are of type ServiceRecord. If no
services were found, then this vector is empty and
the parameter errorReason is set. However, note that
this vector may also be empty when no error occurred
but when the other device simply offers no services
that were searched for.errorReason - 0 indicates successful completion of service
search (either returning a list of matching
services or an empty list if there are none),
1 indicates the remote device was not reachable,
2 that the service search ended with an error
from the Bluetooth stack, and
3 that the search was canceled prematurely by
another thread.
public void AuthenticationFailure(java.lang.Object sender,
java.lang.Object remote,
java.lang.Exception e,
java.lang.String msg)
AuthenticationProgressHandler
AuthenticationFailure in interface AuthenticationProgressHandlersender - The object which sent this event.e - Reason for the failue, can be null.msg - Reaseon for the failue, can be null
public void AuthenticationProgress(java.lang.Object sender,
java.lang.Object remote,
int cur,
int max,
java.lang.String msg)
AuthenticationProgressHandler
AuthenticationProgress in interface AuthenticationProgressHandlersender - The object which sent this event.remote - The remote end with which the authentication is performed.cur - The current stage in the authentication.max - The maximum number of stages.msg - If not null, a message describing the last successful stage.
public boolean AuthenticationStarted(java.lang.Object sender,
java.lang.Object remote)
AuthenticationProgressHandler
AuthenticationStarted in interface AuthenticationProgressHandlersender - The object which sent this event.remote - The remote end with which the authentication is performed.
Depends on the sender of the event.
public void AuthenticationSuccess(java.lang.Object sender,
java.lang.Object remote,
java.lang.Object result)
AuthenticationProgressHandler
AuthenticationSuccess in interface AuthenticationProgressHandlersender - The object which sent this event.remote - The remote end with which the authentication is performed.
Depends on the sender of the event.result - The result, if any, of the successful authentication. This can
e.g. be a shared key or a set of keys or can even be null if the authentication
event is enough to signal successful authentication.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||