GoldenGateConnectionManager / com.fitbit.goldengate.node / Peer

Peer

abstract class Peer<T : StackService>

Interface for Golden Gate Nodes. Used to represent a connection and encapsulates the protocol

Constructors

<init>

Peer(stackService: T, peerRole: PeerRole)

Interface for Golden Gate Nodes. Used to represent a connection and encapsulates the protocol

Properties

peerRole

val peerRole: PeerRole

stackService

val stackService: T

Functions

connection

abstract fun connection(): Observable<PeerConnectionStatus>

Get a reference to the connection of the Peer. If the Peer is not yet connected, it will connect upon subscription. The returned Observable will be shared for all callers connection until the connection is lost or disconnected. A successive call after disconnected will return a new Observable. Disposing the returned Observable will NOT disconnect the connection. This method should be Synchronized with disconnect and close

disconnect

abstract fun disconnect(): Unit

Disconnects the Peer if currently connected. All subscribers of the current connection will have their disposables disposed. This method should be Synchronized with connection and close

Inheritors

StackPeer

class StackPeer<T : StackService> : Peer<T>

A Peer (hub or node) that encapsulates a connection via a Stack including the StackConfig, StackService, Stack, and Bridge