Class SocketAvailabilityChecker
java.lang.Object
be.yildizgames.common.application.helper.network.SocketAvailabilityChecker
- All Implemented Interfaces:
AvailabilityChecker
Checks the availability of a network resource using socket connections.
- Author:
- Grégory Van den Borre
-
Constructor Summary
ConstructorsConstructorDescriptionSocketAvailabilityChecker(ServerAccessConfiguration configuration) Creates a new checker with the given server configuration. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanChecks if the availability status is currently checking.final booleanChecks if the target resource is currently reported as offline.final booleanisOnline()Checks if the target resource is available online.
-
Constructor Details
-
SocketAvailabilityChecker
Creates a new checker with the given server configuration.- Parameters:
configuration- the server access configuration
-
-
Method Details
-
isOnline
public final boolean isOnline()Description copied from interface:AvailabilityCheckerChecks if the target resource is available online.- Specified by:
isOnlinein interfaceAvailabilityChecker- Returns:
- true if the target resource is available, false otherwise.
-
isChecking
public final boolean isChecking()Checks if the availability status is currently checking.- Returns:
- true if checking availability, false otherwise
-
isOffLine
public final boolean isOffLine()Checks if the target resource is currently reported as offline.- Returns:
- true if offline, false otherwise
-