public abstract class

EnvironmentService

extends Object
java.lang.Object
   ↳ uk.ac.imperial.presage2.core.environment.EnvironmentService
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

An EnvironmentService provides a high level service to a Participant and/or the NetworkController by accessing the raw data in the environment shared state.

This provides an abstraction layer to the shared state as well as protection of shared state data (performing object copys when necessary) and access limitations as required

Summary

Fields
protected EnvironmentSharedStateAccess sharedState
Protected Constructors
EnvironmentService(EnvironmentSharedStateAccess sharedState)
Public Methods
void initialise(Map<StringSharedState> globalSharedState)
This method is deprecated. Initialise in ctor using EnvironmentSharedStateAccess to create state.
void registerParticipant(EnvironmentRegistrationRequest req)
Called when a participant is registered (optional).
void registerParticipant(EnvironmentRegistrationRequest req, Map<StringSharedState> globalSharedState)
This method is deprecated. Use registerParticipant(EnvironmentRegistrationRequest) and create global shared state with EnvironmentSharedStateAccess.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

protected EnvironmentSharedStateAccess sharedState

Protected Constructors

protected EnvironmentService (EnvironmentSharedStateAccess sharedState)

Public Methods

public void initialise (Map<StringSharedState> globalSharedState)

This method is deprecated.
Initialise in ctor using EnvironmentSharedStateAccess to create state.

Initialise global shared state required by this environmentservice (optional).

public void registerParticipant (EnvironmentRegistrationRequest req)

Called when a participant is registered (optional).

public void registerParticipant (EnvironmentRegistrationRequest req, Map<StringSharedState> globalSharedState)

This method is deprecated.
Use registerParticipant(EnvironmentRegistrationRequest) and create global shared state with EnvironmentSharedStateAccess.

Called when a participant is registered (optional).