Skip to content

Commit 7172d74

Browse files
committed
fixed defect 0000004
1 parent eaab6df commit 7172d74

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed

src/main/java/org/audit4j/core/AuditManager.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
import org.audit4j.core.annotation.AsyncAuditAnnotationAttributes;
2828
import org.audit4j.core.dto.AnnotationAuditEvent;
29+
import org.audit4j.core.dto.AsyncAnnotationAuditMessage;
2930
import org.audit4j.core.dto.AsyncAuditMessage;
3031
import org.audit4j.core.dto.AsyncCallAuditDto;
3132
import org.audit4j.core.dto.AuditEvent;
@@ -199,6 +200,9 @@ public boolean audit(Class<?> clazz, Method method, Object[] args) {
199200
asyncAuditDto.setMethod(method);
200201
asyncAuditDto.setArgs(args);
201202

203+
AsyncAnnotationAuditMessage message = new AsyncAnnotationAuditMessage();
204+
message.setConf(Context.getConfig());
205+
message.setAsyncAuditDto(asyncAuditDto);
202206
final AsyncAuditEngine engine = AsyncAuditEngine.getInstance();
203207
engine.init();
204208
engine.send(asyncAuditDto);
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
package org.audit4j.core.dto;
2+
3+
import java.io.Serializable;
4+
5+
import org.audit4j.core.Configuration;
6+
7+
/**
8+
* The Class AsyncAnnotationAuditMessage.
9+
*
10+
* @author <a href="mailto:[email protected]">Janith Bandara</a>
11+
*/
12+
public class AsyncAnnotationAuditMessage implements Serializable{
13+
14+
/**
15+
* asdas
16+
*/
17+
private static final long serialVersionUID = 1L;
18+
19+
/** The conf. */
20+
private Configuration conf;
21+
22+
/** The async audit dto. */
23+
private AnnotationAuditEvent asyncAuditDto;
24+
25+
/**
26+
* Gets the conf.
27+
*
28+
* @return the conf
29+
*/
30+
public Configuration getConf() {
31+
return conf;
32+
}
33+
34+
/**
35+
* Sets the conf.
36+
*
37+
* @param conf the new conf
38+
*/
39+
public void setConf(Configuration conf) {
40+
this.conf = conf;
41+
}
42+
43+
/**
44+
* Gets the async audit dto.
45+
*
46+
* @return the async audit dto
47+
*/
48+
public AnnotationAuditEvent getAsyncAuditDto() {
49+
return asyncAuditDto;
50+
}
51+
52+
/**
53+
* Sets the async audit dto.
54+
*
55+
* @param asyncAuditDto the new async audit dto
56+
*/
57+
public void setAsyncAuditDto(AnnotationAuditEvent asyncAuditDto) {
58+
this.asyncAuditDto = asyncAuditDto;
59+
}
60+
}

0 commit comments

Comments
 (0)