BusConnectionBase¶
-
public abstract class
BusConnectionBaseextends AbstractActivatable implements BusConnection¶ Utility base class for the implementation of the
BusConnectioninterface. Subclasses need to use this object for synchronization. Subclasses need to callsetSocket(Socket)with a valid socket beforeactivate()will be called.activate()will automatically callhandshake().- Author
jwienke
Methods¶
getOptions¶
-
public SocketOptions
getOptions()¶
getReader¶
-
protected ReadableByteChannel
getReader()¶ Returns the reader for the internal socket.
- Returns
reader instance or
nullif called beforeactivate()
getSocket¶
getWriter¶
-
protected WritableByteChannel
getWriter()¶ Returns the writer for the internal socket.
- Returns
writer instance or
nullif called beforeactivate()
handshake¶
-
protected abstract void
handshake()¶ Performs the handshake step of the protocol.
- Throws
RSBException – error during handshake
readLength¶
-
protected int
readLength()¶ Extract length of next notification blob.
- Throws
IOException – error while reading from the socket
- Returns
Number of bytes
setOptions¶
-
protected void
setOptions(SocketOptions options)¶ Sets the options for the socket to hold in this instance.
- Parameters
options – socket options to hold