This commit is contained in:
crusader 2018-05-10 17:33:00 +09:00
parent cc011d6924
commit 0e435f73ff
4 changed files with 52 additions and 1 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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<NoAuthProbe> readAllByDomain(Domain domain) throws OverflowException;

View File

@ -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;
}