Home Reference Source
public class | source

SprayAdapter

Extends:

* → SprayAdapter

SprayAdapter adapts the usage of a Spray RPS in the foglet library.

See:

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public get

The in-view ID of the peer in the network

public get

The out-view ID of the peer in the network

Method Summary

Public Methods
public

Get the IDs of all available neighbours

public

getNeighbours(limit: Integer): String[]

Get the IDs of all available neighbours with or without their suffix -I or -O

public

Get the IDs of all available neighbours with or without their suffix -I or -O

Private Methods
private

_buildRPS(options: Object): Spray

Build a Spray RPS

Public Constructors

public constructor() source

Public Members

public get inviewId: string: * source

The in-view ID of the peer in the network

Return:

string

The in-view ID of the peer

public get outviewId: string: * source

The out-view ID of the peer in the network

Return:

string

The out-view ID of the peer

Public Methods

public getArcs(): String[] source

Get the IDs of all available neighbours

Return:

String[]

Set of IDs for all available neighbours

public getNeighbours(limit: Integer): String[] source

Get the IDs of all available neighbours with or without their suffix -I or -O

Params:

NameTypeAttributeDescription
limit Integer

Max number of neighbours to look for

Return:

String[]

Set of IDs for all available neighbours

public getReachableNeighbours(transform: Boolean): String[] source

Get the IDs of all available neighbours with or without their suffix -I or -O

Params:

NameTypeAttributeDescription
transform Boolean

transform IDs into reachable ids to used for send messages => (peer) => peer-O

Return:

String[]

Set of IDs for all available neighbours

Private Methods

private _buildRPS(options: Object): Spray source

Build a Spray RPS

Params:

NameTypeAttributeDescription
options Object

Options used to build the RPS

Return:

Spray

The Spray network