[유치수] [NOBTS] remove Tracer.

git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-tomcat-profiler/trunk@566 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
Chisu Yu
2012-09-03 10:05:59 +00:00
parent 1b560b995e
commit 455f9c3bba
16 changed files with 227 additions and 476 deletions
@@ -1,131 +1,15 @@
package com.profiler.context;
public interface Annotation {
public enum Annotation {
ClientSend("CS"), ClientRecv("CR"), ServerSend("SS"), ServerRecv("SR");
public static class ClientSend implements Annotation {
@Override
public String toString() {
return "@CLIENT_SEND";
}
private String code;
Annotation(String code) {
this.code = code;
}
public static class ClientRecv implements Annotation {
@Override
public String toString() {
return "@CLIENT_RECV";
}
}
public static class ServerSend implements Annotation {
@Override
public String toString() {
return "@SERVER_SEND";
}
}
public static class ServerRecv implements Annotation {
@Override
public String toString() {
return "@SERVER_RECV";
}
}
public static class Message implements Annotation {
private String message;
public Message(String message) {
this.message = message;
}
public String getMessage() {
return this.message;
}
@Override
public String toString() {
return "@MSG=" + message;
}
}
public static class RpcName implements Annotation {
private final String service;
private final String rpc;
public RpcName(String service, String rpc) {
this.service = service;
this.rpc = rpc;
}
public String getService() {
return service;
}
public String getRpc() {
return rpc;
}
@Override
public String toString() {
return "@RPCNAME={service=" + service + ", rpc=" + rpc + "}";
}
}
public static class ClientAddr implements Annotation {
private final String ip;
private final int port;
public ClientAddr(String ip, int port) {
this.ip = ip;
this.port = port;
}
public String getIp() {
return ip;
}
public int getPort() {
return port;
}
@Override
public String toString() {
return "@CLIENT_ADDR={" + ip + ":" + port + "}";
}
}
public static class ServerAddr implements Annotation {
private final String ip;
private final int port;
public ServerAddr(String ip, int port) {
this.ip = ip;
this.port = port;
}
public String getIp() {
return ip;
}
public int getPort() {
return port;
}
@Override
public String toString() {
return "@SERVER_ADDR={" + ip + ":" + port + "}";
}
}
public static class BinaryAnnotation implements Annotation {
private final String key;
private final String type;
private final byte[] value;
public BinaryAnnotation(String key, Object value) {
this.key = key;
this.type = value.getClass().getName();
// TODO: convert to byte
this.value = null;
}
public String getCode() {
return this.code;
}
}