Java: TPS module interface

Java programmers can implement TPS-style programs by extending the TPS class. The engine invokes the user’s process method.

  • This method is passed a String mode that is one of Start, Run, or Time.
  • This method is passed a message reference in the Run mode.
  • This method returns a disposition list.
  • A TPS can be used to implement additional protocol drivers using the UPoC protocol.

Apart from its constructors and destroy method, the TPS class has one method:

public DispositionList process (
        CloverEnv cloverEnv, 
        String context, 
        String mode, 
        Message msg)
        throws CLOVERLEAFException
  • context identifies which of the various TPS-style points of control is involved, for example, sms_ib_data.
  • mode identifies whether the TPS is run in Start, Run, or Time mode. Requirements for Shutdown logic are handled by the destroy method inherited from the UPoC class.
  • The message reference is a message that is passing through the engine. For Start and Time mode, the message can be null.
  • The returned DispositionList instructs the engine what to do with the message that is passed into the invocation, and the message that is created during the invocation.

The context of a TPS instance, in most cases, is the same on every invocation of the process method. The exception being the case of a startup TPS which can also have context for startup_send_ok and startup_send_fail.