[유치수] [NOBTS] modify class associated with Tagging.

git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-tomcat-profiler/trunk@536 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
Chisu Yu
2012-08-27 05:30:48 +00:00
parent 147bfed2fc
commit a4e26e8c68
9 changed files with 230 additions and 46 deletions
@@ -2,36 +2,31 @@ package com.profiler.context;
public interface Annotation {
public static final String CLIENT_SEND = "@CLIENT_SEND";
public static final String CLIENT_RECV = "@CLIENT_RECV";
public static final String SERVER_SEND = "@SERVER_SEND";
public static final String SERVER_RECV = "@SERVER_RECV";
public static class ClientSend implements Annotation {
@Override
public String toString() {
return CLIENT_SEND;
return "@CLIENT_SEND";
}
}
public static class ClientRecv implements Annotation {
@Override
public String toString() {
return CLIENT_RECV;
return "@CLIENT_RECV";
}
}
public static class ServerSend implements Annotation {
@Override
public String toString() {
return SERVER_SEND;
return "@SERVER_SEND";
}
}
public static class ServerRecv implements Annotation {
@Override
public String toString() {
return SERVER_RECV;
return "@SERVER_RECV";
}
}
@@ -42,6 +37,10 @@ public interface Annotation {
this.message = message;
}
public String getMessage() {
return this.message;
}
@Override
public String toString() {
return "@MSG=" + message;
@@ -57,6 +56,14 @@ public interface Annotation {
this.rpc = rpc;
}
public String getService() {
return service;
}
public String getRpc() {
return rpc;
}
@Override
public String toString() {
return "@RPCNAME={service=" + service + ", rpc=" + rpc + "}";
@@ -64,28 +71,48 @@ public interface Annotation {
}
public static class ClientAddr implements Annotation {
private final String address;
private final String ip;
private final int port;
public ClientAddr(String address) {
this.address = address;
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=" + address;
return "@CLIENT_ADDR={" + ip + ":" + port + "}";
}
}
public static class ServerAddr implements Annotation {
private final String address;
private final String ip;
private final int port;
public ServerAddr(String address) {
this.address = address;
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=" + address;
return "@SERVER_ADDR={" + ip + ":" + port + "}";
}
}