public class UartbusStreamerEndpoint extends Object implements Closeable
Modifier and Type | Field and Description |
---|---|
protected eu.javaexperience.interfaces.simple.SimpleGet<UartbusConnection> |
getConnection |
protected static eu.javaexperience.log.Logger |
LOG |
protected eu.javaexperience.patterns.behavioral.mediator.EventMediator<byte[]> |
packetStream |
protected boolean |
runStreamer |
protected Thread |
streamer |
protected UartbusConnection |
workingConnection |
Constructor and Description |
---|
UartbusStreamerEndpoint(eu.javaexperience.interfaces.simple.SimpleGet<UartbusConnection> getConnection) |
Modifier and Type | Method and Description |
---|---|
void |
cleanupConncection() |
void |
close()
Shuts down the Api endpoint but doesn't close the connection
|
UartbusConnection |
getApi() |
eu.javaexperience.patterns.behavioral.mediator.EventMediator<byte[]> |
getPacketStreamer() |
void |
sendPacket(byte[] data) |
void |
startStreaming() |
protected static final eu.javaexperience.log.Logger LOG
protected eu.javaexperience.interfaces.simple.SimpleGet<UartbusConnection> getConnection
protected volatile UartbusConnection workingConnection
protected eu.javaexperience.patterns.behavioral.mediator.EventMediator<byte[]> packetStream
protected Thread streamer
protected volatile boolean runStreamer
public UartbusStreamerEndpoint(eu.javaexperience.interfaces.simple.SimpleGet<UartbusConnection> getConnection)
public UartbusConnection getApi()
public void sendPacket(byte[] data)
public void cleanupConncection()
public eu.javaexperience.patterns.behavioral.mediator.EventMediator<byte[]> getPacketStreamer()
public void startStreaming()
public void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2020. All rights reserved.