Intel

Developer Zone

ServiceApplet

com.intel.util

Class ServiceApplet

  • All Implemented Interfaces:
    com.intel.runtime.comm.InternalService


    public abstract class ServiceApplet
    extends IntelApplet
    implements com.intel.runtime.comm.InternalService
    This is the base class that must be inherited by a service type applet implementation. This class should be used for implementing the service side of an inter-applet communication only.
    • Constructor Detail

      • ServiceApplet

        public ServiceApplet()
    • Method Detail

      • onInternalSessionOpen

        public final int onInternalSessionOpen(long sessionId,
                                com.intel.runtime.comm.UUID clientId,
                                byte[] params)
        This method must not be used directly.
        Specified by:
        onInternalSessionOpen in interface com.intel.runtime.comm.InternalService
        See Also:
        onInternalOpen(long sessionId, String clientUuid, byte[] request)
      • onInternalSessionClose

        public final int onInternalSessionClose(long sessionId)
        This method must not be used directly.
        Specified by:
        onInternalSessionClose in interface com.intel.runtime.comm.InternalService
        See Also:
        onInternalClose(long sessionId)
      • onInternalOpen

        public int onInternalOpen(long sessionId,
                         java.lang.String clientUuid,
                         byte[] request)
        This method will be called by the VM when a new internal session is opened to the service applet by a client applet instance.
        Parameters:
        sessionId - the internal session identifier of the new session
        clientUuid - the UUID of the client applet that opened the session, may be used by the applet to decide if it should accept or reject the session
        request - the input data sent to the applet during session creation
        Returns:
        APPLET_SUCCESS if the operation was processed successfully, any other status code in case of error (note that all error codes will be treated similarly by the VM by canceling the open session command and sending the status code to the client).
      • onInternalCommand

        public abstract void onInternalCommand(long sessionId,
                             int commandId,
                             byte[] request,
                             ServiceResult result)
        This method will be called by the VM to handle an internal command sent to this applet instance. To return the response data to the command, set the result.responseData member before returning from this method. In order to provide a return value for the command, which will be delivered to the client instance communicating with the applet, result.responseCode member should be set.
        Parameters:
        sessionId - the internal session identifier
        commandId - the command ID (applet specific)
        request - the input data for this command
        result - the argument for setting the resulting response data/code
      • onInternalClose

        public void onInternalClose(long sessionId)
        This method will be called by the VM when the internal session being handled by this service applet instance is closed by the client.
        Parameters:
        sessionId - the internal session identifier