public class CoAPClient extends java.lang.Object implements IAlcsCoAPSend
限定符和类型 | 方法和说明 |
---|---|
void |
addNotifyListener(IAlcsCoAPResHandler handler) |
boolean |
cancelMessage(long msgId) |
void |
cancelRequest(AlcsCoAPRequest request,
long msgId) |
AlcsCoAPServiceStatus |
getCoAPServiceStatus() |
static CoAPClient |
getInstance() |
void |
initCoApService() |
void |
registerResource(java.lang.String resourceName,
java.lang.String path) |
void |
releaseCoAPService() |
void |
removeNotifyListener(IAlcsCoAPResHandler handler) |
long |
sendRequest(AlcsCoAPRequest request,
IAlcsCoAPReqHandler requestCallback) |
boolean |
sendResponse(AlcsCoAPResponse response) |
long |
subcribe(java.lang.String data,
java.lang.String coapUri,
IAlcsCoAPReqHandler handler) |
void |
unSubcribe(java.lang.String data,
java.lang.String coapUri) |
public static CoAPClient getInstance()
public void initCoApService()
public void registerResource(java.lang.String resourceName, java.lang.String path)
public void addNotifyListener(IAlcsCoAPResHandler handler)
public void removeNotifyListener(IAlcsCoAPResHandler handler)
public void releaseCoAPService()
public AlcsCoAPServiceStatus getCoAPServiceStatus()
public void cancelRequest(AlcsCoAPRequest request, long msgId)
public long sendRequest(AlcsCoAPRequest request, IAlcsCoAPReqHandler requestCallback)
sendRequest
在接口中 IAlcsCoAPSend
requestCallback
- 发送CoAP请求public boolean sendResponse(AlcsCoAPResponse response)
sendResponse
在接口中 IAlcsCoAPSend
public boolean cancelMessage(long msgId)
cancelMessage
在接口中 IAlcsCoAPSend
public long subcribe(java.lang.String data, java.lang.String coapUri, IAlcsCoAPReqHandler handler)
data
- coapUri
- handler
- 订阅public void unSubcribe(java.lang.String data, java.lang.String coapUri)
data
- coapUri
- 取消订阅