added start discovery
This commit is contained in:
parent
3c0dd5fb51
commit
3ccea663d5
|
@ -0,0 +1,63 @@
|
|||
package com.loafle.overflow.module.discovery.model;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 9. 29.
|
||||
*/
|
||||
public class DiscoveryStartInfo {
|
||||
String startIp;
|
||||
String endIP;
|
||||
String excludeIp;
|
||||
String startPort;
|
||||
String endPort;
|
||||
List<String> services;
|
||||
|
||||
public String getStartIp() {
|
||||
return startIp;
|
||||
}
|
||||
|
||||
public void setStartIp(String startIp) {
|
||||
this.startIp = startIp;
|
||||
}
|
||||
|
||||
public String getEndIP() {
|
||||
return endIP;
|
||||
}
|
||||
|
||||
public void setEndIP(String endIP) {
|
||||
this.endIP = endIP;
|
||||
}
|
||||
|
||||
public String getExcludeIp() {
|
||||
return excludeIp;
|
||||
}
|
||||
|
||||
public void setExcludeIp(String excludeIp) {
|
||||
this.excludeIp = excludeIp;
|
||||
}
|
||||
|
||||
public String getStartPort() {
|
||||
return startPort;
|
||||
}
|
||||
|
||||
public void setStartPort(String startPort) {
|
||||
this.startPort = startPort;
|
||||
}
|
||||
|
||||
public String getEndPort() {
|
||||
return endPort;
|
||||
}
|
||||
|
||||
public void setEndPort(String endPort) {
|
||||
this.endPort = endPort;
|
||||
}
|
||||
|
||||
public List<String> getServices() {
|
||||
return services;
|
||||
}
|
||||
|
||||
public void setServices(List<String> services) {
|
||||
this.services = services;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package com.loafle.overflow.module.discovery.service;
|
||||
|
||||
import com.loafle.overflow.commons.service.MessagePublisher;
|
||||
import com.loafle.overflow.module.discovery.model.DiscoveryStartInfo;
|
||||
import org.codehaus.jackson.map.ObjectMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 9. 28.
|
||||
*/
|
||||
@Service("DiscoveryService")
|
||||
public class DiscoveryService {
|
||||
|
||||
@Autowired
|
||||
private MessagePublisher messagePublisher;
|
||||
|
||||
public void startDiscovery(DiscoveryStartInfo startInfo) throws IOException {
|
||||
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
|
||||
String json = objectMapper.writeValueAsString(startInfo);
|
||||
|
||||
System.out.println("Start Discovery");
|
||||
System.out.println(json);
|
||||
// this.messagePublisher.publishToProbe("/auth", noAuthProbe.getTempProbeKey(), "NoAuthProbeService.acceptNoAuthProbe", probe.getProbeKey());
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user