java.lang.Object
be.yildizgames.common.application.helper.network.SocketAvailabilityChecker
All Implemented Interfaces:
AvailabilityChecker

public class SocketAvailabilityChecker extends Object implements AvailabilityChecker
Checks the availability of a network resource using socket connections.
Author:
Grégory Van den Borre
  • Constructor Details

    • SocketAvailabilityChecker

      public SocketAvailabilityChecker(ServerAccessConfiguration configuration)
      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: AvailabilityChecker
      Checks if the target resource is available online.
      Specified by:
      isOnline in interface AvailabilityChecker
      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