javax.microedition.contactless.rf
Interface PlainTagConnection

All Superinterfaces:
javax.microedition.io.Connection, TagConnection

public interface PlainTagConnection
extends TagConnection

This interface defines the basic mechanism to communicate with the different RFID tags that contain non-NFC Forum formatted data. This data is usually in the format defined by the tag vendor. Each of these data formats have their own special features and access commands.

This interface provides high level method to access non-NFC Forum formatted data on the target. The execution of, for example, read command on a tag might require also the authentication and the data area selection before the actual read can be done. From the application perspective it would be easiest to do all these actions with one method call. Therefore this interface provides a Vector input parameter to set all the needed commands into one parameter and send them to the target with one method call. Each command is presented as one element in the Vector. The returned Vector contains the elements that correspond to the return values of the commands in the input Vector. The Vector is used to make the handling of separate commands and their return values easier.

Still there may be a need to specify more tag-specific classes that support the actual structure and properties of the physical tag. These more detailed tag-specific classes are out of scope for this API.


Method Summary
 java.util.Vector transceive(java.util.Vector input)
          This method allows the applications to communicate with the discovered RFID tag.
 
Methods inherited from interface javax.microedition.io.Connection
close
 

Method Detail

transceive

java.util.Vector transceive(java.util.Vector input)
                            throws ContactlessException,
                                   java.io.IOException

This method allows the applications to communicate with the discovered RFID tag. The tag specific access commands are set to the input vector. These commands can be for example an authentication command and after that a read command with needed sector and block information.

Since operations performed on the tag vary based on the physical type of the tag, return value of this method is impossible to define. Therefore an output vector is provided into the method and the results of the requested commands are placed into it.

Parameters:
input - commands requested to be performed on the tag
Returns:
the result of the performed commands
Throws:
ContactlessException - if commands cannot be performed or the operation is not supported by the API implementation
java.lang.NullPointerException - if input is null
java.io.IOException - if connection has been closed


Copyright © 2004-2009 Nokia Corporation. All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.