本文整理了Java中org.eclipse.californium.core.coap.Request.getSenderIdentity
方法的一些代码示例,展示了Request.getSenderIdentity
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getSenderIdentity
方法的具体详情如下:
包路径:org.eclipse.californium.core.coap.Request
类名称:Request
方法名:getSenderIdentity
[英]Gets the authenticated (remote) sender's identity.
[中]获取经过身份验证的(远程)发件人的身份。
代码示例来源:origin: eclipse/californium
@Test
public void testSenderIdentityIsAddedToIncomingRequest() throws Exception {
Principal clientId = new Principal() {
@Override
public String getName() {
return "Client";
}
};
latch = new CountDownLatch(1);
RawData inboundRequest = new RawData(getSerializedRequest(), new InetSocketAddress(CoAP.DEFAULT_COAP_PORT),
clientId);
connector.receiveMessage(inboundRequest);
assertTrue(latch.await(2, TimeUnit.SECONDS));
assertThat(receivedRequests.get(0).getSenderIdentity(), is(clientId));
}
代码示例来源:origin: eclipse/californium
assembled.setSenderIdentity(request.getSenderIdentity());
assembleMessage(status, assembled);
代码示例来源:origin: org.eclipse.californium/californium-core
assembled.setSenderIdentity(request.getSenderIdentity());
assembleMessage(status, assembled);
内容来源于网络,如有侵权,请联系作者删除!