diff --git a/src/main/java/com/loafle/overflow/model/noauthprobe/NoAuthProbe.java b/src/main/java/com/loafle/overflow/model/noauthprobe/NoAuthProbe.java index 4f7c8c9..4774db6 100644 --- a/src/main/java/com/loafle/overflow/model/noauthprobe/NoAuthProbe.java +++ b/src/main/java/com/loafle/overflow/model/noauthprobe/NoAuthProbe.java @@ -18,10 +18,12 @@ public class NoAuthProbe { private String description; private MetaNoAuthProbeStatus status; private String tempProbeKey; - private Date createDate; + private Date connectDate; private String apiKey; private Domain domain; private Probe probe; + private String connectAddress; + private Date createDate; @Id @GeneratedValue(strategy= GenerationType.IDENTITY) @@ -100,6 +102,25 @@ public class NoAuthProbe { this.probe = probe; } + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "CONNECT_DATE", nullable = true) + public Date getConnectDate() { + return connectDate; + } + + public void setConnectDate(Date connectDate) { + this.connectDate = connectDate; + } + + @Column(name = "CONNECT_ADDRESS", nullable = true, length = 50) + public String getConnectAddress() { + return connectAddress; + } + + public void setConnectAddress(String connectAddress) { + this.connectAddress = connectAddress; + } + // @Override // public boolean equals(Object o) { // if (this == o) return true; diff --git a/src/main/java/com/loafle/overflow/model/probe/Probe.java b/src/main/java/com/loafle/overflow/model/probe/Probe.java index 2063ecd..44891d3 100644 --- a/src/main/java/com/loafle/overflow/model/probe/Probe.java +++ b/src/main/java/com/loafle/overflow/model/probe/Probe.java @@ -27,6 +27,8 @@ public class Probe { private Date authorizeDate; private Member authorizeMember; private int targetCount; + private Date connectDate; + private String connectAddress; public Probe() { @@ -150,6 +152,25 @@ public class Probe { this.targetCount = targetCount; } + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "CONNECT_DATE", nullable = true) + public Date getConnectDate() { + return connectDate; + } + + public void setConnectDate(Date connectDate) { + this.connectDate = connectDate; + } + + @Column(name = "CONNECT_ADDRESS", nullable = true, length = 50) + public String getConnectAddress() { + return connectAddress; + } + + public void setConnectAddress(String connectAddress) { + this.connectAddress = connectAddress; + } + @PrePersist void preInsert() { this.targetCount = 0; diff --git a/src/main/java/com/loafle/overflow/service/central/noauthprobe/NoAuthProbeService.java b/src/main/java/com/loafle/overflow/service/central/noauthprobe/NoAuthProbeService.java index d0c93a9..49bc545 100644 --- a/src/main/java/com/loafle/overflow/service/central/noauthprobe/NoAuthProbeService.java +++ b/src/main/java/com/loafle/overflow/service/central/noauthprobe/NoAuthProbeService.java @@ -16,6 +16,10 @@ public interface NoAuthProbeService { NoAuthProbe regist(NoAuthProbe noAuthProbe) throws OverflowException; @ProbeAPI NoAuthProbe readByTempProbeKey(String tempKey) throws OverflowException; + @ProbeAPI + void onConnect(String tempKey, String connectAddress) throws OverflowException; + @ProbeAPI + void onDisconnect(String tempKey) throws OverflowException; @WebappAPI List readAllByDomain(Domain domain) throws OverflowException; diff --git a/src/main/java/com/loafle/overflow/service/central/probe/ProbeService.java b/src/main/java/com/loafle/overflow/service/central/probe/ProbeService.java index 1dfeac5..f4ecb22 100644 --- a/src/main/java/com/loafle/overflow/service/central/probe/ProbeService.java +++ b/src/main/java/com/loafle/overflow/service/central/probe/ProbeService.java @@ -29,4 +29,9 @@ public interface ProbeService { @ProbeAPI //? Probe modify(Probe probe) throws OverflowException; + @ProbeAPI + void onConnect(String probeKey, String connectAddress) throws OverflowException; + @ProbeAPI + void onDisconnect(String probeKey) throws OverflowException; + }