Intel

Developer Zone

IntelApplet

com.intel.util

Class IntelApplet

  • java.lang.Object
    • com.trustedlogic.isdi.Service
      • com.intel.util.IntelApplet


  • public abstract class IntelApplet
    extends com.trustedlogic.isdi.Service
    This is the base class that must be inherited by all applets. The applets must not inherit the com.trustedlogic.isdi.Service class directly.
    • Constructor Summary

      Constructors
      Constructor and Description
      IntelApplet()
    • Method Summary

      Methods
      Modifier and Type Method and Description
      java.lang.String getUUID()
      Returns the UUID of this applet in String representation.
      abstract int invokeCommand(int commandId, byte[] request)
      This method will be called by the VM to handle a command sent to this applet instance.
      int onClose()
      This method will be called by the VM when the session being handled by this applet instance is being closed and this applet instance is about to be removed.
      void onCloseSession()
      This method must not be used directly.
      int onCommand(int commandId, com.trustedlogic.isdi.SDecoder request, com.trustedlogic.isdi.SEncoder response)
      This method must not be used directly.
      int onInit(byte[] request)
      This method will be called by the VM when a new session is opened to the applet and this applet instance is being created to handle the new session.
      int onOpenSession(com.trustedlogic.isdi.SDecoder request, com.trustedlogic.isdi.SEncoder response)
      This method must not be used directly.
      void setResponse(byte[] response, int index, int length)
      Updates the response data to be returned during invokeCommand processing.
      • Methods inherited from class com.trustedlogic.isdi.Service

        getServiceProperty, isStopped, stop
      • Methods inherited from class java.lang.Object

        equals, hashCode, toString
    • Constructor Detail

      • IntelApplet

        public IntelApplet()
    • Method Detail

      • onOpenSession

        public final int onOpenSession(com.trustedlogic.isdi.SDecoder request,
                        com.trustedlogic.isdi.SEncoder response)
        This method must not be used directly.
        Overrides:
        onOpenSession in class com.trustedlogic.isdi.Service
        Parameters:
        request - the data sent with the open session.
        response - the data answered to the open session
        Returns:
        the execution status that will be forwarded to the client (see SResult)
        See Also:
        onInit(byte[])
      • onCloseSession

        public final void onCloseSession()
        This method must not be used directly.
        Overrides:
        onCloseSession in class com.trustedlogic.isdi.Service
        See Also:
        onClose()
      • onCommand

        public final int onCommand(int commandId,
                    com.trustedlogic.isdi.SDecoder request,
                    com.trustedlogic.isdi.SEncoder response)
        This method must not be used directly.
        Specified by:
        onCommand in class com.trustedlogic.isdi.Service
        Parameters:
        commandId - the command identifier specified by the client
        request - the command data
        response - the response data
        Returns:
        the execution status that will be forwarded to the client (see SResult)
        See Also:
        invokeCommand(int commandId, byte[] request)
      • onInit

        public int onInit(byte[] request)
        This method will be called by the VM when a new session is opened to the applet and this applet instance is being created to handle the new session. To return the response data to the command, call the setResponse method before returning from this method.
        Parameters:
        request - the input data sent to the applet during session creation
        Returns:
        APPLET_SUCCESS if the operation was processed successfully, error status code otherwise (see APPLET_ERROR... definitions above for possible values).
      • onClose

        public int onClose()
        This method will be called by the VM when the session being handled by this applet instance is being closed and this applet instance is about to be removed. This method cannot provide response data and therefore calling setResponse from it will throw a NullPointerException.
        Returns:
        APPLET_SUCCESS if the operation was processed successfully, error status code otherwise (see APPLET_ERROR... definitions above for possible values).
      • invokeCommand

        public abstract int invokeCommand(int commandId,
                        byte[] request)
        This method will be called by the VM to handle a command sent to this applet instance. To return the response data to the command, call the setResponse method before returning from this method.
        Parameters:
        commandId - the command ID (applet specific)
        request - the input data for this command
        Returns:
        APPLET_SUCCESS if the operation was processed successfully, error status code otherwise (see APPLET_ERROR... definitions above for possible values).
      • setResponse

        public final void setResponse(byte[] response,
                       int index,
                       int length)
        Updates the response data to be returned during invokeCommand processing. Note that calling this method more than once will reset the response data previously set.
        Parameters:
        response - the response data to be returned during command processing
        index - index in the response data array
        length - length of the response data to be returned
      • getUUID

        public final java.lang.String getUUID()
        Returns the UUID of this applet in String representation.
        Returns:
        The UUID of this applet in String representation.