public abstract class VehicleMessageStreamer
extends java.lang.Object
Constructor and Description |
---|
VehicleMessageStreamer() |
Modifier and Type | Method and Description |
---|---|
abstract java.lang.String |
getRawMessage() |
abstract VehicleMessage |
parseMessage(java.lang.String line) |
abstract VehicleMessage |
parseNextMessage()
Deserialize and return the next messages from the internally buffered
stream.
|
void |
receive(byte[] bytes,
int length)
Add additional bytes to the buffer from the data source.
|
abstract byte[] |
serializeForStream(VehicleMessage message)
Serialize the message and insert any required delimiters for insertion
into a message stream.
|
public abstract VehicleMessage parseNextMessage()
public abstract VehicleMessage parseMessage(java.lang.String line)
public abstract java.lang.String getRawMessage()
public abstract byte[] serializeForStream(VehicleMessage message) throws SerializationException
message
- the message to serialize.SerializationException
- if the message cannot be serialized.public void receive(byte[] bytes, int length)
bytes
- an array of bytes received from the interface.length
- number of bytes received, and thus the amount that should
be read from the array.