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 UartbusConnectionIOExceptionpublic Map<String,String> listAttributes()
listAttributes in interface UartbusConnectionpublic String getAttribute(String key)
getAttribute in interface UartbusConnectionpublic void setAttribute(String key, String value)
setAttribute in interface UartbusConnectionpublic byte[] getNextPacket()
throws IOException
getNextPacket in interface UartbusConnectionIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void init()
init in interface UartbusConnectionCopyright © 2020. All rights reserved.