/** * Stores a new Message under the account of the currently connected user. * In this case, the provided message will only be stored in the back-end * database and it will not be forwarded to the message broker. * * @param message The {@link KapuaDataMessage } to be stored * @return an {@link InsertResponse} object encapsulating the response from * the datastore * @throws Exception Whenever something bad happens. See specific * {@link KapuaService} exceptions. */ @POST @Consumes({ MediaType.APPLICATION_XML }) @Produces({ MediaType.APPLICATION_XML }) @ApiOperation(nickname = "dataMessageStore", value = "Stores a new KapuaDataMessage", // notes = "Stores a new KapuaDataMessage under the account of the currently connected user. In this case, the provided message will only be stored in the back-end database and it will not be forwarded to the message broker.", // response = StorableId.class) public StorableEntityId storeMessage( @ApiParam(value = "The ScopeId in which to store the message", required = true, defaultValue = DEFAULT_SCOPE_ID) @PathParam("scopeId") ScopeId scopeId,// @ApiParam(value = "The KapuaDataMessage to be stored") KapuaDataMessage message) throws Exception { message.setScopeId(scopeId); return new StorableEntityId(MESSAGE_STORE_SERVICE.store(message).toString()); }
@ApiParam(value = "The timeout of the request execution") @QueryParam("timeout") Long timeout, @ApiParam(value = "The input request", required = true) KapuaDataMessage requestMessage) throws Exception { requestMessage.setScopeId(scopeId); streamService.publish(requestMessage, timeout); return Response.ok().build();
kapuaDataMessage.setScopeId(scopeId); kapuaDataMessage.setDeviceId(jsonKapuaDataMessage.getDeviceId()); kapuaDataMessage.setClientId(jsonKapuaDataMessage.getClientId());
kapuaDataMessage.setScopeId(scopeId); kapuaDataMessage.setDeviceId(jsonKapuaDataMessage.getDeviceId()); kapuaDataMessage.setClientId(jsonKapuaDataMessage.getClientId());
kapuaDataMessage.setScopeId(account.getId()); kapuaDataMessage.setDeviceId(device != null ? device.getId() : null); kapuaDataMessage.setClientId(kuraDataMessage.getChannel().getClientId());
kapuaDataMessage.setScopeId(account.getId()); kapuaDataMessage.setDeviceId(device != null ? device.getId() : null); kapuaDataMessage.setClientId(kuraDataMessage.getChannel().getClientId());