Class IOLogFactory

java.lang.Object
overit.geocall.io.IOLogFactory

public class IOLogFactory extends Object
Factory che permette di creare il tracer più appropriato che potrà poi esssere utilizzato per loggare le richieste/risposte/errori delle varie chiamate ai web services. E' necessario specificare il nome del servizio, la sua direzione ed un profiler il quale fornirà al tracer le informazioni per trattare le informazioni nel modo più opportuno a seconda della tipologia di servizio.
  • Method Details

    • makeTracer

      public static IOLogTracer makeTracer(IOLogProfiler profiler, String name, Boolean client)
      Factory method da utilizzare per la creazione di un tracer.
      Parameters:
      profiler - The IOLogProfiler
      name - nome del servizio
      client - true se è Geocall ad effettuare la chiamata al servizio. false se il richiesta proviene da un server esterno.
      Returns:
      l'istanza del IOLogTracer che potrà essere utilzzata per il salvataggio dei Log. In caso di errori nell'istanziazione del tracer, verrà ritornato il valore null.
    • getTracer

      protected static IOLogTracer getTracer(String service, boolean client, IOLogProfiler profiler) throws IOException
      Throws:
      IOException
    • newCustomTracer

      protected static IOLogTracer newCustomTracer(Class<? extends IOLogTracer> cls, String service, boolean client, IOLogProfiler profiler)
    • setCustomFileLogTracer

      public static void setCustomFileLogTracer(Class<? extends FileLogTracer> tracer)
      Custom file log tracer that will be used instead of the standard FileLogTracer
      Parameters:
      tracer - instance of the custom tracer
    • setCustomDBLogTracer

      public static void setCustomDBLogTracer(Class<? extends DBLogTracer> tracer)
      Custom db log tracer that will be used instead of the standard DBLogTracer
      Parameters:
      tracer - instance of the custom tracer