Class SiAuto


  • public final class SiAuto
    extends Object
    Provides automatically created objects for using the SmartInspect and Session classes. This class provides a static field called si of type SmartInspect. Furthermore, a Session instance named main with si as parent is ready to use. The SiAuto class is especially useful if you do not want to create SmartInspect and Session instances by yourself.

    The connections string of si is set to "pipe(reconnect=true, reconnect.interval=1s)", the application name to "Auto" and the session name of main to "Main".

    Please note that the default connections string has been changed in SmartInspect 3.0. In previous versions, the default connections string was set to "tcp()".

    The public static members of this class are threadsafe.

     import com.gurock.smartinspect.SiAuto;
    
     public class SiAutoExample
     {
          public static void main(String[] args)
          {
              SiAuto.si.setEnabled(true);
              SiAuto.main.enterProcess("SiAutoExample");
              try
              {
                  .
                  .
                  .
              }
              finally
              {
                  SiAuto.main.leaveProcess("SiAutoExample");
              }
          }
     }
     
    • Field Detail

      • si

        public static final SmartInspect si
        Automatically created SmartInspect instance.

        The connections string is set to "pipe(reconnect=true, reconnect.interval=1s)". Please see Protocol.isValidOption() for information on the used options. The application name is set to "Auto".

        Please note that the default connections string has been changed in SmartInspect 3.0. In previous versions, the default connections string was set to "tcp()".

      • main

        public static final Session main
        Automatically created Session instance.

        The session name is set to "Main" and the parent to SiAuto.si.