1 26 27 package org.objectweb.corba.trace.PI; 28 29 30 import org.objectweb.util.monolog.api.BasicLevel; 31 import org.objectweb.util.monolog.api.Logger; 32 33 37 public class TraceSI extends org.omg.CORBA.LocalObject 38 implements org.omg.PortableInterceptor.ServerRequestInterceptor { 39 40 protected Logger logger_; 41 42 45 private short logLevelServer; 46 47 48 51 protected ServerRequestInfoReader srir_; 52 53 56 public TraceSI(int trace_slot, org.omg.PortableInterceptor.ORBInitInfo info) { 57 58 logger_ = MonologLogger.loggerSI; 59 logLevelServer = 1; 60 this.srir_ = new ServerRequestInfoReader(logLevelServer); 61 62 if (MonologLogger.enableTrace) 63 logger_.log(BasicLevel.DEBUG, "Init Trace Interceptor CORBA Server Side"); 64 } 65 66 69 73 public void receive_request_service_contexts(org.omg.PortableInterceptor.ServerRequestInfo ri){ 74 if (MonologLogger.enableTrace) 75 logger_.log(BasicLevel.INFO, srir_.displayServerRequestInfoMonolog(ri)); 76 } 77 78 82 public void receive_request(org.omg.PortableInterceptor.ServerRequestInfo ri) { 83 if (MonologLogger.enableTrace) 84 logger_.log(BasicLevel.INFO, srir_.displayServerRequestInfoMonolog(ri)); 85 } 86 87 91 public void send_reply(org.omg.PortableInterceptor.ServerRequestInfo ri) { 92 if (MonologLogger.enableTrace) 93 logger_.log(BasicLevel.INFO, srir_.displayServerRequestInfoMonolog(ri)); 94 } 95 96 100 public void send_exception(org.omg.PortableInterceptor.ServerRequestInfo ri) { 101 if (MonologLogger.enableTrace) 102 logger_.log(BasicLevel.ERROR, srir_.displayServerRequestInfoMonolog(ri,false)); 103 } 104 105 110 public void send_other(org.omg.PortableInterceptor.ServerRequestInfo ri) { 111 if (MonologLogger.enableTrace) 112 logger_.log(BasicLevel.INFO, srir_.displayServerRequestInfoMonolog(ri)); 113 } 114 115 118 public java.lang.String name() { 119 return "LoggingServerInterceptor"; 120 } 121 122 125 public void destroy() { 126 } 127 } 128 | Popular Tags |