public class UartbusServiceBridge extends Object implements Closeable
Modifier and Type | Field and Description |
---|---|
protected UartBus |
bus |
protected static eu.javaexperience.log.Logger |
LOG |
protected List<AutoCloseable> |
onClose |
protected eu.javaexperience.interfaces.simple.getBy.GetBy1<Boolean,UartbusPacketDispatch> |
packetAcceptor |
protected static ThreadLocal<UartbusServiceRequest> |
REQUESTS |
protected eu.javaexperience.interfaces.simple.publish.SimplePublish1<byte[]> |
responseHandler |
protected Object |
serviceObject |
Constructor and Description |
---|
UartbusServiceBridge(Object serviceObject,
eu.javaexperience.interfaces.simple.publish.SimplePublish1<byte[]> responseHandler,
eu.javaexperience.interfaces.simple.getBy.GetBy1<Boolean,UartbusPacketDispatch> packetAcceptor) |
Modifier and Type | Method and Description |
---|---|
void |
addReleasableResource(AutoCloseable cl) |
protected static Object |
applyCall(UartbusServiceRequest req,
Object subject,
Method m) |
static UartbusServiceBridge |
attachServiceTo(Object service,
UartBus bus,
Integer serviceAddress,
byte... path) |
protected static boolean |
canThrowPosixErrno(Method m) |
void |
close() |
void |
feedPacket(byte[] rawData) |
void |
feedPacket(ParsedUartBusPacket packet) |
UartBus |
getAssociatedBus() |
protected UartBus |
getBus() |
static UartbusServiceRequest |
getCurrentRequest() |
int |
getFromAddress(int to) |
protected Object |
getServiceObject() |
protected static void |
handleCall(UartbusServiceRequest req,
Object subject,
Method m) |
protected static void |
responsePacket(UartbusServiceRequest req,
int dix,
Object... response) |
protected void |
service(UartbusPacketDispatch disp) |
protected static void |
serviceRequest(UartbusServiceRequest req,
Object servObj) |
void |
setAssociatedBus(UartBus bus) |
protected static eu.javaexperience.log.Logger LOG
protected UartBus bus
protected Object serviceObject
protected eu.javaexperience.interfaces.simple.publish.SimplePublish1<byte[]> responseHandler
protected eu.javaexperience.interfaces.simple.getBy.GetBy1<Boolean,UartbusPacketDispatch> packetAcceptor
protected List<AutoCloseable> onClose
protected static ThreadLocal<UartbusServiceRequest> REQUESTS
public UartbusServiceBridge(Object serviceObject, eu.javaexperience.interfaces.simple.publish.SimplePublish1<byte[]> responseHandler, eu.javaexperience.interfaces.simple.getBy.GetBy1<Boolean,UartbusPacketDispatch> packetAcceptor)
public void setAssociatedBus(UartBus bus)
public UartBus getAssociatedBus()
public void feedPacket(byte[] rawData)
public void addReleasableResource(AutoCloseable cl)
public void feedPacket(ParsedUartBusPacket packet)
public static UartbusServiceRequest getCurrentRequest()
protected void service(UartbusPacketDispatch disp)
protected static void serviceRequest(UartbusServiceRequest req, Object servObj) throws Throwable
Throwable
protected static void handleCall(UartbusServiceRequest req, Object subject, Method m) throws Throwable
Throwable
protected static Object applyCall(UartbusServiceRequest req, Object subject, Method m) throws Throwable
Throwable
protected static void responsePacket(UartbusServiceRequest req, int dix, Object... response)
protected static boolean canThrowPosixErrno(Method m)
public int getFromAddress(int to)
protected UartBus getBus()
protected Object getServiceObject()
public static UartbusServiceBridge attachServiceTo(Object service, UartBus bus, Integer serviceAddress, byte... path)
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2020. All rights reserved.