huang
2025-11-18 1566e4c7604d85737ea67fe6757e71b8185fa48e
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
package com.mes.connect.industrialinterface;
 
import java.io.IOException;
 
/**
 * 通信统一接口 - 服务器模式
 *
 * @author yzx
 * @version 1.0
 */
public interface IndustrialServer extends AutoCloseable {
    /**
     * 开启服务
     * @throws IOException
     */
    void start() throws IOException;
 
    /**
     * 停止服务
     */
    void stop();
 
    /**
     * 服务是否运行
     * @return
     */
    boolean isRunning();
 
    /**
     * 修改 handler
     * @param handler
     */
    void setDataHandler(IndustrialDataHandler handler);
 
    /**
     * 关闭服务
     * @throws IOException
     */
    @Override
    void close() throws IOException;
}