public class UartbusRpcEndpoint extends Object implements UartbusConnection
Modifier and Type | Class and Description |
---|---|
protected static class |
UartbusRpcEndpoint.PacketEndpointQueue |
Modifier and Type | Field and Description |
---|---|
protected UartbusPacketConnector |
conn |
protected boolean |
default_echo_loopback |
protected boolean |
default_loopback_send_packets |
protected static byte[] |
END_OF_RECEIVE |
protected static eu.javaexperience.log.Logger |
LOG |
protected static String |
SESSION_KEY |
protected Set<UartbusRpcEndpoint.PacketEndpointQueue> |
sessions |
Constructor and Description |
---|
UartbusRpcEndpoint(UartbusPacketConnector connector) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
String |
getAttribute(String key) |
byte[] |
getNextPacket() |
protected UartbusRpcEndpoint.PacketEndpointQueue |
getSessionQueue() |
void |
init() |
Map<String,String> |
listAttributes() |
void |
sendPacket(byte[] data) |
void |
setAttribute(String key,
String value) |
protected static final eu.javaexperience.log.Logger LOG
protected UartbusPacketConnector conn
protected static final byte[] END_OF_RECEIVE
protected volatile Set<UartbusRpcEndpoint.PacketEndpointQueue> sessions
protected boolean default_echo_loopback
protected boolean default_loopback_send_packets
protected static final String SESSION_KEY
public UartbusRpcEndpoint(UartbusPacketConnector connector)
protected UartbusRpcEndpoint.PacketEndpointQueue getSessionQueue()
public void sendPacket(byte[] data) throws IOException
sendPacket
in interface UartbusConnection
IOException
public Map<String,String> listAttributes()
listAttributes
in interface UartbusConnection
public String getAttribute(String key)
getAttribute
in interface UartbusConnection
public void setAttribute(String key, String value)
setAttribute
in interface UartbusConnection
public byte[] getNextPacket() throws IOException
getNextPacket
in interface UartbusConnection
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public void init()
init
in interface UartbusConnection
Copyright © 2020. All rights reserved.