1 26 27 package org.objectweb.corba.trace.PI; 28 29 35 public class ClientRequestInfoReader extends RequestInfoReader { 37 40 final static private short logLevelClientStart = 2; 41 42 46 public ClientRequestInfoReader(short logLevel) { 47 super(logLevel); 48 } 49 50 53 58 public String displayClientRequestInfoMonolog(org.omg.PortableInterceptor.ClientRequestInfo info) { 59 return displayClientRequestInfoMonolog(info,true); 60 } 61 62 67 public String displayClientRequestInfoMonolog( 68 org.omg.PortableInterceptor.ClientRequestInfo info,boolean withException) { 69 String res = ""; 70 res = res + displayRequestInfo(info, logLevel); 71 if (withException) res = res + displayException(info); if (logLevel > logLevelClientStart) { 73 res = res + displayEffectiveProfile(info); 74 } 75 res = res + displayReceivedExceptionID(info); 76 77 return res; 78 } 79 80 83 84 89 protected String displayEffectiveProfile( 90 org.omg.PortableInterceptor.ClientRequestInfo info) { 91 org.omg.IOP.TaggedProfile profile = info.effective_profile(); 92 String res = "effective profile = "; 93 if (profile.tag == org.omg.IOP.TAG_INTERNET_IOP.value) 94 res = res + "TAG_INTERNET_IOP"; 95 else if (profile.tag == org.omg.IOP.TAG_MULTIPLE_COMPONENTS.value) 96 res = res + "TAG_MULTIPLE_COMPONENTS"; 97 else 98 res = res + "UNKNOWN_TAG"; 99 res = res + ": \n\t"; 100 for (int i = 0; i < profile.profile_data.length; i++) 101 res = res + getOctet(profile.profile_data[i]); 102 return res; 103 } 104 105 110 protected String displayReceivedExceptionID( 111 org.omg.PortableInterceptor.ClientRequestInfo info) { 112 String res = ""; 113 try { 114 res = 115 res 116 + "\t" 117 + "received exception id = " 118 + info.received_exception_id(); 119 } catch (org.omg.CORBA.BAD_INV_ORDER ex) { 120 } 122 return res; 124 } 125 126 129 130 protected String getLabelException() { 131 return "received exception = "; 132 } 133 134 protected String displayMore( 135 org.omg.PortableInterceptor.RequestInfo info) { 136 return displayClientRequestInfoMonolog( 137 (org.omg.PortableInterceptor.ClientRequestInfo ) info); 138 } 139 140 protected org.omg.CORBA.Any requestOpException( 141 org.omg.PortableInterceptor.RequestInfo info) { 142 org.omg.CORBA.Any res = null; 143 try{ 145 res = ((org.omg.PortableInterceptor.ClientRequestInfo ) info) 146 .received_exception(); 147 }catch (org.omg.CORBA.NO_RESOURCES ex){} 148 return res; 149 } 150 } 151 | Popular Tags |