BusConnection

public interface BusConnection extends Activatable

Interface for connections to the socket based transport.

Author

jwienke

Methods

getOptions

SocketOptions getOptions()

Returns the current configuration of the connection.

Returns

configuration of the connection

isActiveShutdown

boolean isActiveShutdown()

Indicates whether the connection is currently performing an active shutdown as a consequence of calling shutdown().

Returns

true in case of active shutdown, else false

readNotification

Notification readNotification()

Reads a notification from the connection. Blocks if necessary.

Throws

IOException – communication error

Returns

the read notification

sendNotification

void sendNotification(Notification notification)

Sends a notification over the connection.

Parameters

notification – the notification to send. Must be complete so that it can be serialized.

Throws

IOException – error sending the notification

shutdown

void shutdown()

This method starts and orderly shutdown of the connection. It needs to be called before deactivate() for this procedure to succeed. Should be callable multiple times without raising an error. Calls after the first are usually ignored.

Throws

IOException – error indicating the shutdown due to socket writing problems