Package overit.geocall.io
Class IOLogFactory
java.lang.Object
overit.geocall.io.IOLogFactory
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 Summary
Modifier and TypeMethodDescriptionprotected static IOLogTracergetTracer(String service, boolean client, IOLogProfiler profiler) static IOLogTracermakeTracer(IOLogProfiler profiler, String name, Boolean client) Factory method da utilizzare per la creazione di un tracer.protected static IOLogTracernewCustomTracer(Class<? extends IOLogTracer> cls, String service, boolean client, IOLogProfiler profiler) static voidsetCustomDBLogTracer(Class<? extends DBLogTracer> tracer) Custom db log tracer that will be used instead of the standardDBLogTracerstatic voidsetCustomFileLogTracer(Class<? extends FileLogTracer> tracer) Custom file log tracer that will be used instead of the standardFileLogTracer
-
Method Details
-
makeTracer
Factory method da utilizzare per la creazione di un tracer.- Parameters:
profiler- The IOLogProfilername- nome del servizioclient-truese è Geocall ad effettuare la chiamata al servizio.falsese il richiesta proviene da un server esterno.- Returns:
- l'istanza del
IOLogTracerche potrà essere utilzzata per il salvataggio dei Log. In caso di errori nell'istanziazione del tracer, verrà ritornato il valorenull.
-
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
Custom file log tracer that will be used instead of the standardFileLogTracer- Parameters:
tracer- instance of the custom tracer
-
setCustomDBLogTracer
Custom db log tracer that will be used instead of the standardDBLogTracer- Parameters:
tracer- instance of the custom tracer
-