public interface

NetworkAdaptor

uk.ac.imperial.presage2.core.network.NetworkAdaptor
Known Indirect Subclasses

Class Overview

A network adaptor is a participant's perception of it's communication channel to the outside world.

Summary

Public Methods
abstract NetworkAddress getAddress()
Gets this device's network address
abstract Set<NetworkAddress> getConnectedNodes()
The network adaptor may also provide a network node discovery service which we describe in the following form.
abstract List<Message> getMessages()
Gets inputs currently queued at this adaptor.
abstract void sendMessage(Message m)
Send a message

Public Methods

public abstract NetworkAddress getAddress ()

Gets this device's network address

Returns
  • this device's network address

public abstract Set<NetworkAddress> getConnectedNodes ()

The network adaptor may also provide a network node discovery service which we describe in the following form.

Returns
  • List of UUIDs of connected nodes.
Throws
UnsupportedOperationException if the networkadaptor does not support this operation.

public abstract List<Message> getMessages ()

Gets inputs currently queued at this adaptor.

Returns
  • list of messages received.

public abstract void sendMessage (Message m)

Send a message