public class DeviceServerSystem extends ServerSystem {
- private Cbor<HashMap<String, Object>> mCbor = new Cbor<HashMap<String, Object>>();
- private HashMap<ChannelHandlerContext, CoapSignaling> mCsmMap = new HashMap<>();
+ private Cbor<HashMap<String, Object>> mCbor = new Cbor<HashMap<String, Object>>();
+ private HashMap<ChannelHandlerContext, CoapSignaling> mCsmMap = new HashMap<>();
/**
*
switch (coapRequest.getObserve()) {
case SUBSCRIBE:
coapDevice.addObserveRequest(
- Bytes.bytesToLong(coapRequest.getToken()),
+ Bytes.bytesToLong(
+ coapRequest.getToken()),
coapRequest);
coapDevice.addObserveChannel(targetChannel);
break;
case UNSUBSCRIBE:
coapDevice.removeObserveChannel(targetChannel);
- coapDevice.removeObserveRequest(
- Bytes.bytesToLong(coapRequest.getToken()));
+ coapDevice.removeObserveRequest(Bytes
+ .bytesToLong(coapRequest.getToken()));
break;
default:
break;
StringBuffer uriPath = new StringBuffer();
uriPath.append("/" + Constants.PREFIX_OIC);
uriPath.append("/" + Constants.DEVICE_PRESENCE_URI);
- ConnectorPool.getConnection("rd").sendRequest(MessageBuilder.createRequest(
- RequestMethod.POST, uriPath.toString(), null,
- ContentFormat.APPLICATION_CBOR,
- cbor.encodingPayloadToCbor(payload)), null);
+ ConnectorPool.getConnection("rd")
+ .sendRequest(MessageBuilder.createRequest(
+ RequestMethod.POST, uriPath.toString(), null,
+ ContentFormat.APPLICATION_CBOR,
+ cbor.encodingPayloadToCbor(payload)), null);
}
}
}
switch (urlPath) {
-
- case OICConstants.ACCOUNT_FULL_URI:
- ctx.writeAndFlush(msg);
- ctx.close();
- return;
+ /*
+ * case OICConstants.ACCOUNT_FULL_URI:
+ * ctx.writeAndFlush(msg); ctx.close(); return;
+ */
case OICConstants.ACCOUNT_SESSION_FULL_URI:
HashMap<String, Object> payloadData = mCbor