序号 | 方法 | 阐明 |
1 | void start(); | Starts the server by starting all endpoints this server is assigned to Each endpoint binds to its port. If no endpoint is assigned to the server, the server binds to CoAP's default port 5683. |
2 | void stop(); | Stops the server, i.e. unbinds it from all ports. |
3 | void destroy(); | Destroys the server, i.e. unbinds from all ports and frees all system resources. |
4 | ServerInterface add(Resource... resources); | Adds one or more resources to the server. |
5 | boolean remove(Resource resource); | Adds an endpoint for receive and sending CoAP messages on. |
6 | List<Endpoint> getEndpoints(); | Gets the endpoints this server is bound to. |
序号 | 属性 | 阐明 |
1 | Resource root | The root resource. |
2 | NetworkConfig config | 网络配置对象 |
3 | MessageDeliverer deliverer | The message deliverer |
4 | List<Endpoint> endpoints | The list of endpoints the server connects to the network. |
5 | ScheduledExecutorService executor; | The executor of the server for its endpoints (can be null). |
6 | boolean running | false |
7 | class RootResource extends CoapResource | 内部实现类 |
序号 | 方法 | 阐明 |
1 | Resource getRoot() | Gets the root of this server |
2 | Resource createRoot() | Creates a root for this server. Can be overridden to create another root. |
欢迎光临 IT评测·应用市场-qidao123.com (https://dis.qidao123.com/) | Powered by Discuz! X3.4 |