How to create an event with integer and float type in Yahoo! S4

62 views Asked by At

Suppose that I want to create an event from a Java bean in Yahoo! S4. I can use the following code to do that:

import io.s4.client.Driver
import io.s4.client.Message
Driver d = new Driver(hostName, port);
Message m = new Message(streamName, clazz, string);
d.send(m);

Message Constructor Arguments:

  • streamName - any name for the stream
  • clazz - the fully qualified name of the event class for the stream
  • string - the string representation of the object

Question:

What would the string representation of the following object look like so that it can be used in an event?

public class CarType {

private String carNO;
private String tyreNO;
private double pressureReading;
private long Timer;
private boolean carMoving;

}
0

There are 0 answers