|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TargetProperties
This interface collects the properties that are common for all contactless targets supported by this specification.
The API implementation may extend this interface to store more target type and physical media type specific properties.
Method Summary | |
---|---|
java.lang.Class[] |
getConnectionNames()
Returns the names of connection interfaces that can be opened to communicate with the target as Class objects. |
java.lang.String |
getMapping()
If the target type is RFID_TAG this method returns the
name of the mapping between the commands in the
PlainTagConnection
and the physical target structure. |
java.lang.String |
getProperty(java.lang.String name)
With this method the application can query target specific properties. |
TargetType[] |
getTargetTypes()
Returns the type of the discovered target. |
java.lang.String |
getUid()
Returns the unique identifier (UID) for the target. |
java.lang.String |
getUrl()
Returns the URL to open a connection to the NDEF_TAG target. |
java.lang.String |
getUrl(java.lang.Class connectionName)
Returns the URL for the requested connection to the discovered target. |
boolean |
hasTargetType(TargetType type)
Convenience method for checking if the detected target is of specified target type. |
Method Detail |
---|
java.lang.Class[] getConnectionNames()
Class
objects. The marker interface
TagConnection
must not be returned.
The API implementation must use the lowest level
interface in case of inherited connections.
java.lang.String getMapping()
If the target type is RFID_TAG
this method returns the
name of the mapping between the commands in the
PlainTagConnection
and the physical target structure. The returned String
can be,
for example, "Mifare 1K
". If the access to the tag is only
supported through some target-specific connection interface the API
implementation provides and not through the PlainTagConnection
interface, this method returns null
. If mapping name is
provided for the RFID_TAG
, the PlainTagConnection
must be one of the connections returned with the method
getConnectionNames
. Mapping names ISO14443A
and
ISO14443B
may be used to indicate protocol
based mapping.
For NDEF_TAG
targets this method returns the name and the
version of the NDEF mapping, like for example, "JewelTag v1.0"
".
In both cases the mapping name is provided by the API implementation or
by the physical tag manufacturer. For other target types the method
must return null
.
null
if target type does
not have mappingjava.lang.String getProperty(java.lang.String name)
APDUConnection
to the external smart card. In this
case the name of the property could be JSR177_slot
. The
property name values are implementation dependant and not specified in the API.
name
- the name of the requested property
null
if the property
with the specified name
has not been definedTargetType[] getTargetTypes()
TargetType
class. An NDEF_TAG
target always has other physical level target type. This type is either
RFID_TAG
or ISO14443_CARD
. In the case of
NDEF_TAG
also the physical level type must
be returned. The NDEF_TAG
target must be
the first value in the return array followed by the physical level type.
java.lang.String getUid()
Returns the unique identifier (UID) for the target. The identifier is likely to be globally unique, though with some devices it may not be constant all the time. Visual tags do not have this identifier. The rules for constructing the UID for different target technologies are defined in the
java.lang.String getUrl()
NDEF_TAG
target.
If the type of the target is not NDEF_TAG null
is returned.
NDEF_TAG
target, otherwise null
java.lang.String getUrl(java.lang.Class connectionName)
connectionName
- name of the connection
java.lang.NullPointerException
- if connectionName
is
null
java.lang.IllegalArgumentException
- if the URL for the given
connectionName
is not supported or allowed by the
targetboolean hasTargetType(TargetType type)
type
- the type of the target
true
if the target is of the specified type, else
false
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |