Direct-BT  2.3.1
Direct-BT - Direct Bluetooth Programming.
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
org.direct_bt.BTSecurityLevel Enum Reference

Bluetooth Security Level. More...

Collaboration diagram for org.direct_bt.BTSecurityLevel:

Public Member Functions

 BTSecurityLevel (final byte v)
 

Static Public Member Functions

static BTSecurityLevel get (final String name) throws IllegalArgumentException
 Maps the specified name to a constant of BTSecurityLevel. More...
 
static BTSecurityLevel get (final byte value)
 Maps the specified integer value to a constant of BTSecurityLevel. More...
 

Public Attributes

 UNSET =((byte)0)
 Security Level not set, value 0. More...
 
 NONE =((byte)1)
 No encryption and no authentication. More...
 
 ENC_ONLY =((byte)2)
 Encryption and no authentication (no MITM). More...
 
 ENC_AUTH =((byte)3)
 Encryption and authentication (MITM). More...
 
 ENC_AUTH_FIPS =((byte)4)
 Authenticated Secure Connections. More...
 
final byte value
 

Detailed Description

Bluetooth Security Level.

This BTSecurityLevel is natively compatible with Linux/BlueZ's BT_SECURITY values 1-4.

See get(byte) for its native integer mapping.

Since
2.1.0

Definition at line 38 of file BTSecurityLevel.java.

Constructor & Destructor Documentation

◆ BTSecurityLevel()

org.direct_bt.BTSecurityLevel.BTSecurityLevel ( final byte  v)

Definition at line 82 of file BTSecurityLevel.java.

Member Function Documentation

◆ get() [1/2]

static BTSecurityLevel org.direct_bt.BTSecurityLevel.get ( final byte  value)
static

Maps the specified integer value to a constant of BTSecurityLevel.

Parameters
valuethe integer value to be mapped to a constant of this enum type.
Returns
the corresponding constant of this enum type, using UNSET if not supported.

Definition at line 72 of file BTSecurityLevel.java.

◆ get() [2/2]

static BTSecurityLevel org.direct_bt.BTSecurityLevel.get ( final String  name) throws IllegalArgumentException
static

Maps the specified name to a constant of BTSecurityLevel.

Implementation simply returns valueOf(String). This maps the constant names itself to their respective constant.

Parameters
namethe string name to be mapped to a constant of this enum type.
Returns
the corresponding constant of this enum type.
Exceptions
IllegalArgumentExceptionif the specified name can't be mapped to a constant of this enum type as described above.

Definition at line 63 of file BTSecurityLevel.java.

Here is the caller graph for this function:

Member Data Documentation

◆ ENC_AUTH

org.direct_bt.BTSecurityLevel.ENC_AUTH =((byte)3)

Encryption and authentication (MITM).

Also known as BT_SECURITY_HIGH, value 3.

Definition at line 46 of file BTSecurityLevel.java.

◆ ENC_AUTH_FIPS

org.direct_bt.BTSecurityLevel.ENC_AUTH_FIPS =((byte)4)

Authenticated Secure Connections.

Also known as BT_SECURITY_FIPS, value 4.

Definition at line 48 of file BTSecurityLevel.java.

◆ ENC_ONLY

org.direct_bt.BTSecurityLevel.ENC_ONLY =((byte)2)

Encryption and no authentication (no MITM).

Also known as BT_SECURITY_MEDIUM, value 2.

Definition at line 44 of file BTSecurityLevel.java.

◆ NONE

org.direct_bt.BTSecurityLevel.NONE =((byte)1)

No encryption and no authentication.

Also known as BT_SECURITY_LOW, value 1.

Definition at line 42 of file BTSecurityLevel.java.

◆ UNSET

org.direct_bt.BTSecurityLevel.UNSET =((byte)0)

Security Level not set, value 0.

Definition at line 40 of file BTSecurityLevel.java.

◆ value

final byte org.direct_bt.BTSecurityLevel.value

Definition at line 50 of file BTSecurityLevel.java.


The documentation for this enum was generated from the following file: