首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 其他相关 >

btrace事例

2013-07-09 
btrace例子@BTracepublic class OracleTimeoutTracer {@OnMethod(clazz oracle.net.nt.ConnStrategy,

btrace例子

@BTracepublic class OracleTimeoutTracer {    @OnMethod(clazz = "oracle.net.nt.ConnStrategy", method = "createSocketOptions", location = @Location(value = Kind.ENTRY))    public static void strategy(@Self Object self, Properties paramProperties) {        println(str(paramProperties));    }    @OnMethod(clazz = "oracle.net.nt.TcpNTAdapter", method = "connect", location = @Location(value = Kind.ENTRY))    public static void adapter(@Self Object self) {        Field socketTimeoutField = field("oracle.net.nt.TcpNTAdapter", "sockTimeout");        Field hostField = field("oracle.net.nt.TcpNTAdapter", "host");        Field portField = field("oracle.net.nt.TcpNTAdapter", "port");        int scoketTimeout = (Integer) get(socketTimeoutField, self);        int port = (Integer) get(portField, self);        String host = (String) get(hostField, self);        println(strcat(strcat(strcat(strcat(strcat("host : ", host), ", port : "), str(port)), " , socketTimeout : "),                       str(scoketTimeout)));    }}

?

热点排行