com.intel.security.dalinterface
Class SessionApp
- java.lang.Object
-
- com.intel.security.dalinterface.SessionApp
-
public final class SessionApp extends java.lang.Object
class SessionApp implements Dal session, created for Trusted Applet and Session API-s
-
-
Field Summary
Fields Modifier and Type Field and Description static int
SESSION_NO_FLAG
static int
SESSION_SHARED_FLAG
-
Method Summary
Methods Modifier and Type Method and Description int
closeSession()
close existing Sessionlong
getSessionHandle()
Retrieves Session identification handlejava.lang.String
getTrustedAppId()
Retrieves Session Trusted Application Idboolean
isOpened()
Retrieves Session statusboolean
isShared()
Retrieves isSharedSession propertyint
openSession(byte[] init, int flags)
Opens Session for Trusted Application enabling communicationSessionApp#sendAndReceive()
int
registerEvents(EventsCallbackListener listener)
Register callback for asynchronous event from Trusted Application to existing not shared session applicable for not shared session onlyint
sendAndReceive(int command, TransactionData data)
Synchronous API to provide command and data to Trusted Application and receive responseint
unregisterEvents()
Unregister callback for asynchronous event from Trusted Application to existing session
-
-
-
Field Detail
-
SESSION_SHARED_FLAG
public static final int SESSION_SHARED_FLAG
- See Also:
- Constant Field Values
-
SESSION_NO_FLAG
public static final int SESSION_NO_FLAG
- See Also:
- Constant Field Values
-
-
Method Detail
-
openSession
public final int openSession(byte[] init, int flags)
Opens Session for Trusted Application enabling communicationSessionApp#sendAndReceive()
- Parameters:
flags
- - Session parameters, currently supported SESSION_SHARED_FLAG, SESSION_NO_FLAGinit
- - initial Session data, provided to Trusted Application (optional, can be null)- Returns:
- transaction result or encoded exception, defined in
DalConstants
Class
-
closeSession
public final int closeSession()
close existing Session- Returns:
- transaction result or encoded exception, defined in
DalConstants
Class
-
registerEvents
public final int registerEvents(EventsCallbackListener listener)
Register callback for asynchronous event from Trusted Application to existing not shared session applicable for not shared session only- Parameters:
listener
- -EventsCallbackListener
Class instance- Returns:
- transaction result or encoded exception, defined in
DalConstants
Class
-
unregisterEvents
public final int unregisterEvents()
Unregister callback for asynchronous event from Trusted Application to existing session- Returns:
- transaction result or encoded exception, defined in
DalConstants
Class
-
sendAndReceive
public int sendAndReceive(int command, TransactionData data)
Synchronous API to provide command and data to Trusted Application and receive response- Parameters:
command
- - Trusted Application specific commanddata
- - TransactionData container on invocation: data.request should be set to the request buffer which is sent to the applet data.maxResponseLength should be set to the max expected response length, if (-1) is specified then data.maxResponseLength = request.length on return: data.response is set to the exact response buffer received from the applet data.appletResponseCode is set to the response code returned from the applet- Returns:
- transaction result or encoded exception, defined in
DalConstants
Class
-
getTrustedAppId
public final java.lang.String getTrustedAppId()
Retrieves Session Trusted Application Id- Returns:
- Trusted Application Id
-
isOpened
public final boolean isOpened()
Retrieves Session status- Returns:
- true - opened Session exists; false - Session is not created / closed
-
isShared
public final boolean isShared()
Retrieves isSharedSession property- Returns:
- true - shared session; false - not shared session;
-
getSessionHandle
public final long getSessionHandle()
Retrieves Session identification handle- Returns:
- Session handle or -1 if session isn't opened;
-
-