Class NetworkStateMachine
java.lang.Object
org.eblocker.server.common.network.NetworkStateMachine
The network state machine processes events (e.g. when a new network configuration is received
by the NetworkController) and changes the network state accordingly using the NetworkServices.
-
Constructor Summary
ConstructorsConstructorDescriptionNetworkStateMachine(NetworkServices services, DataSource dataSource, DnsEnableByDefaultChecker dnsEnableByDefaultChecker, EventLogger eventLogger, IpSets ipSets, SslService sslService, EblockerDnsServer dnsServer, Ip6PrefixMonitor ip6PrefixMonitor) -
Method Summary
Modifier and TypeMethodDescriptionvoidCall this method when a device is put on / removed from the whitelist.voiddeviceStateChanged(Device justChangedDevice) voidEnable services that must be started at boot time so that the current state is functionalbooleanbooleanupdateConfiguration(NetworkConfiguration networkConfiguration) Updates the current configuration
-
Constructor Details
-
NetworkStateMachine
@Inject public NetworkStateMachine(NetworkServices services, DataSource dataSource, DnsEnableByDefaultChecker dnsEnableByDefaultChecker, EventLogger eventLogger, IpSets ipSets, SslService sslService, EblockerDnsServer dnsServer, Ip6PrefixMonitor ip6PrefixMonitor)
-
-
Method Details
-
initialize
public void initialize()Enable services that must be started at boot time so that the current state is functional -
isSSLEnabled
public boolean isSSLEnabled() -
updateConfiguration
Updates the current configuration- Parameters:
networkConfiguration-- Returns:
- true, if the network state has changed
-
deviceStateChanged
public void deviceStateChanged()Call this method when a device is put on / removed from the whitelist. -
deviceStateChanged
-