1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
package com.cmsz.vo;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Date;
public class SysLogDTO {
private String class_name;
private String type;
private String time;
private String src_ip;
private String src_port;
private String src_mac;
private String dst_ip;
private String dst_port;
private String dst_mac;
private String protocol;
private String start_time;
private String end_time;
private String primary_user;
private String secondary_user;
private String operation;
private String content;
private String dev_ip;
private String dev_port;
private String dev_mac;
private String authen_status;
private String log_level;
private String session_id;
private String param_len;
private String param;
public String getOperation() {
return operation;
}
public void setOperation(String operation) {
this.operation = operation;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getClass_name() {
return class_name;
}
public void setClass_name(String class_name) {
this.class_name = class_name;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getTime() {
return time;
}
public void setTime(String time) {
this.time = time;
}
public String getSrc_ip() {
return src_ip;
}
public void setSrc_ip(String src_ip) {
this.src_ip = src_ip;
}
public String getSrc_port() {
return src_port;
}
public void setSrc_port(String src_port) {
this.src_port = src_port;
}
public String getSrc_mac() {
return src_mac;
}
public void setSrc_mac(String src_mac) {
this.src_mac = src_mac;
}
public String getDst_ip() {
return dst_ip;
}
public void setDst_ip(String dst_ip) {
this.dst_ip = dst_ip;
}
public String getDst_port() {
return dst_port;
}
public void setDst_port(String dst_port) {
this.dst_port = dst_port;
}
public String getDst_mac() {
return dst_mac;
}
public void setDst_mac(String dst_mac) {
this.dst_mac = dst_mac;
}
public String getProtocol() {
return protocol;
}
public void setProtocol(String protocol) {
this.protocol = protocol;
}
public String getStart_time() {
return start_time;
}
public void setStart_time(String start_time) {
this.start_time = start_time;
}
public String getEnd_time() {
return end_time;
}
public void setEnd_time(String end_time) {
this.end_time = end_time;
}
public String getPrimary_user() {
return primary_user;
}
public void setPrimary_user(String primary_user) {
this.primary_user = primary_user;
}
public String getSecondary_user() {
return secondary_user;
}
public void setSecondary_user(String secondary_user) {
this.secondary_user = secondary_user;
}
public String getDev_ip() {
return dev_ip;
}
public void setDev_ip(String dev_ip) {
this.dev_ip = dev_ip;
}
public String getDev_port() {
return dev_port;
}
public void setDev_port(String dev_port) {
this.dev_port = dev_port;
}
public String getDev_mac() {
return dev_mac;
}
public void setDev_mac(String dev_mac) {
this.dev_mac = dev_mac;
}
public String getAuthen_status() {
return authen_status;
}
public void setAuthen_status(String authen_status) {
this.authen_status = authen_status;
}
public String getLog_level() {
return log_level;
}
public void setLog_level(String log_level) {
this.log_level = log_level;
}
public String getSession_id() {
return session_id;
}
public void setSession_id(String session_id) {
this.session_id = session_id;
}
public String getParam_len() {
return param_len;
}
public void setParam_len(String param_len) {
this.param_len = param_len;
}
public String getParam() {
return param;
}
public void setParam(String param) {
this.param = param;
}
/* public String formatStr(){
StringBuffer sb = new StringBuffer();
Method[] methods = null;
methods = this.getClass().getDeclaredMethods();
for (Method method : methods) {
if (method.getName().startsWith("get")) {
String paramName = method.getName().substring(3)
.toLowerCase();
System.out.println("name:" + paramName);
if("class_name".equals(paramName)){
paramName = "class";
}
String objValue = "";
try{
Object obj = obtainMethodValue(method, this);
if (obj != null) {
if(obj.getClass().equals(Date.class)){
System.out.println(obj.toString());
objValue = DateUtils.getFormatDate((Date)obj, "yyyy-MM-dd hh:mm:ss");
}else{
objValue = obj.toString();
}
}
}catch(Exception e){
}
System.out.println("value:" + objValue);
sb.append(paramName);
sb.append("=");
sb.append("\"");
sb.append(objValue);
sb.append("\" ");
}
}
System.out.println(sb.toString());
return sb.toString();
}*/
private static synchronized Object obtainMethodValue(Method method, Object obj)
throws IllegalArgumentException, IllegalAccessException,
InvocationTargetException {
return method.invoke(obj, null);
}
}