Codota Logo
KapuaDataMessage.setPayload
Code IndexAdd Codota to your IDE (free)

How to use
setPayload
method
in
org.eclipse.kapua.message.device.data.KapuaDataMessage

Best Java code snippets using org.eclipse.kapua.message.device.data.KapuaDataMessage.setPayload (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: eclipse/kapua

@And("^I set the following metrics to the message (\\d+) from the list \"(.+)\"$")
public void appendMetricsToSelectedMessage(int idx, String lstKey, List<TestMetric> metLst) throws Exception {
  List<KapuaDataMessage> tmpMsgLst = (List<KapuaDataMessage>) stepData.get(lstKey);
  KapuaDataMessage tmpMsg = tmpMsgLst.get(idx);
  tmpMsg.setPayload(new KapuaDataPayloadImpl());
  for (TestMetric tmpMet : metLst) {
    switch (tmpMet.getType().trim().toLowerCase()) {
    case "string": {
      tmpMsg.getPayload().getMetrics().put(tmpMet.getMetric(), tmpMet.getValue());
      break;
    }
    case "int": {
      tmpMsg.getPayload().getMetrics().put(tmpMet.getMetric(), Integer.valueOf(tmpMet.getValue()));
      break;
    }
    case "double": {
      tmpMsg.getPayload().getMetrics().put(tmpMet.getMetric(), Double.valueOf(tmpMet.getValue()));
      break;
    }
    case "bool": {
      tmpMsg.getPayload().getMetrics().put(tmpMet.getMetric(), Boolean.valueOf(tmpMet.getValue().trim().toUpperCase()));
      break;
    }
    default: {
      fail(String.format("Unknown metric type [%s]", tmpMet.getType()));
      break;
    }
    }
  }
}
origin: eclipse/kapua

@Given("^I prepare a random message with null payload and save it as \"(.*)\"$")
public void prepareRandomMessageWithNullPayload(String msgKey) throws Exception {
  KapuaDataMessage tmpMessage = createTestMessage(
      ((Account) stepData.get("LastAccount")).getId(),
      ((Device) stepData.get("LastDevice")).getId(),
      ((Device) stepData.get("LastDevice")).getClientId(),
      null, null);
  tmpMessage.setPayload(null);
  stepData.put(msgKey, tmpMessage);
}
origin: eclipse/kapua

kapuaDataMessage.setPayload(kapuaDataPayload);
origin: eclipse/kapua

    });
kapuaDataMessage.setPayload(kapuaDataPayload);
origin: org.eclipse.kapua/kapua-translator-kapua-kura

kapuaDataMessage.setClientId(kuraDataMessage.getChannel().getClientId());
kapuaDataMessage.setChannel(kapuaDataChannel);
kapuaDataMessage.setPayload(kapuaDataPayload);
kapuaDataMessage.setCapturedOn(kuraDataMessage.getPayload().getTimestamp());
kapuaDataMessage.setSentOn(kuraDataMessage.getPayload().getTimestamp());
origin: eclipse/kapua

kapuaDataMessage.setClientId(kuraDataMessage.getChannel().getClientId());
kapuaDataMessage.setChannel(kapuaDataChannel);
kapuaDataMessage.setPayload(kapuaDataPayload);
kapuaDataMessage.setCapturedOn(kuraDataMessage.getPayload().getTimestamp());
kapuaDataMessage.setSentOn(kuraDataMessage.getPayload().getTimestamp());
org.eclipse.kapua.message.device.dataKapuaDataMessagesetPayload

Popular methods of KapuaDataMessage

  • getClientId
  • getChannel
  • getPayload
  • getPosition
  • getScopeId
  • getSentOn
  • setCapturedOn
  • setReceivedOn
  • setSentOn
  • getCapturedOn
  • getDeviceId
  • getReceivedOn
  • getDeviceId,
  • getReceivedOn,
  • setChannel,
  • setClientId,
  • setDeviceId,
  • setPosition,
  • setScopeId,
  • getId,
  • setId

Popular in Java

  • Start an intent from android
  • getSystemService (Context)
  • setContentView (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now