11.07.2015 Views

Contactless Communication API - Oracle Software Delivery Cloud

Contactless Communication API - Oracle Software Delivery Cloud

Contactless Communication API - Oracle Software Delivery Cloud

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Package javax.microedition.contactlessDiscoveryManagerjava.lang.IllegalStateException - if TargetListener for the targetType has already been registeredjava.lang.NullPointerException - if listener or targetType is nulljavax.microedition.contactless.<strong>Contactless</strong>ExceptionaddTransactionListener( TransactionListener )public void addTransactionListener( TransactionListenerjavax.microedition.contactless.<strong>Contactless</strong>Exceptionlistener) throwsParametersThrowsgetInstance()ReturnsThrowsAdds a TransactionListener to receive a notification of the possible transactions happening between the RFID hardwareand the secure element on the device. This transaction happens when an external reader device is accessing secure elementon the device through the RFID hardware. If this feature cannot be supported a <strong>Contactless</strong>Exception must bethrown when trying to register this listener. Multiple listeners are allowed and the notification must be sent to all of them.listener - listener to be addedjava.lang.NullPointerException - if listener is null<strong>Contactless</strong>Exception - if ISO14443_CARD target is not supported or if the <strong>API</strong> implementation can not supportthis featurejavax.microedition.contactless.<strong>Contactless</strong>Exceptionpublic static DiscoveryManager getInstance()This factory method is used to retrieve the instance of this singleton class. Permission needed to instantiate this class canbe found from Appendix A: Security .the instance of the classjava.lang.SecurityException - if the application does not have the permission to instantiate this classgetProperty(java.lang.String)ParametersReturnsThrowspublic java.lang.String getProperty(java.lang.String name)With this method the application can query the properties related to the target discovery. The property can be, for example,the speed to be used in the communication. The property name values are implementation dependant and not specifiedin the <strong>API</strong>.name - the name of the propertythe value of the property, null if the property with the specified name has not been definedjava.lang.NullPointerException - if name is nullgetSupportedTargetTypes()public staticTargetType [] getSupportedTargetTypes()15

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!