com.ibm.rational.test.lt.testgen.core2

Interface IC2ProtocolHandler



  • public interface IC2ProtocolHandler
    Instances of IC2ProtocolHandler are used to represent each extension that is to be used to process the .recmodel on behalf of a certain protocol. Here, "protocol" means more than just a name such as "HTTP", or "Socket". Here "protocol" refers to lt.trace.Msg objects that have protocol, vendor, and version properties that you are prepared to process.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface and Description
      static class  IC2ProtocolHandler.LoadResponse
      LoadResponse is a typesafe enum used as the return value for the load() method.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void complete()
      This method will be called after the call to process() has been performed.
      void init()
      This is the first method within the protocol handler that will be called by the testgen core.
      IC2ProtocolHandler.LoadResponse load(Msg msg)
      This is the second method within the protocol handler that will be called by the testgen core.
      void process(LTTest ltTest)
      This method will be called after all calls to load() have been performed.
      void terminate()
      This method may be called after the calls to load() have been performed.
    • Method Detail

      • init

        void init()
                  throws C2InitializationException
        This is the first method within the protocol handler that will be called by the testgen core. The handler can use this opportunity to establish any internal housekeeping that may be required in later phases.
        Throws:
        C2InitializationException - if an error occurs during initialization.
      • load

        IC2ProtocolHandler.LoadResponse load(Msg msg)
                                             throws C2TestgenException
        This is the second method within the protocol handler that will be called by the testgen core. This is where the handler gets a chance to see every Msg in the recmodel. It is up to the handler to decide whether to keep, and later process, the Msg or not. The handler should compare the various properties of the Msg, such as protocol name, vendor name, version, etc., to determine whether it is interested in the Msg.
        Parameters:
        msg - a com.ibm.rational.test.lt.trace.Msg object
        Returns:
        a LoadResponse (see description of LoadResponse for when to use particular enumerations)
        Throws:
        C2TestgenException - if an error occurs during load.
      • process

        void process(LTTest ltTest)
                     throws C2TestgenException
        This method will be called after all calls to load() have been performed. This is where the handler is given the opportunity to process the loaded protocol data, and emit the processed data into a testsuite. This method will not be called until all data from the recmodel is loaded.
        Parameters:
        ltTest - a com.ibm.rational.test.lt.models.behavior.lttest.LTTest object that represents the testsuite
        Throws:
        TestgenException - if an error occurs during processing
        C2TestgenException
      • complete

        void complete()
                      throws C2TestgenException
        This method will be called after the call to process() has been performed. This is where the handler is given the opportunity to save the testsuite and perform any required clean-up housekeeping.
        Throws:
        TestgenException - if an error occurs during processing
        C2TestgenException
      • terminate

        void terminate()
                       throws C2TestgenException
        This method may be called after the calls to load() have been performed. If this methid is called, another protocol handler has requested EXCLUSIVE access to the recmodel. If this method is called, the protocol handler should immediately release any resources acquired during init(), or load(), and should NOT attempt to produce a testsuite.
        Throws:
        TestgenException - if an error occurs during processing
        C2TestgenException
IBM Rational Performance Tester SDK

© Copyright IBM Corp. 2013. All rights reserved.