Package omero.gateway.util
Class NetworkChecker
- java.lang.Object
-
- omero.gateway.util.NetworkChecker
-
public class NetworkChecker extends java.lang.ObjectChecks if the network is still up.- Since:
- 4.4
-
-
Constructor Summary
Constructors Constructor Description NetworkChecker(java.lang.String address, omero.log.Logger logger)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisAvailable()Checks the network is available or not.booleanisNetworkup(boolean useCachedValue)Returnstrueif the network is still up, otherwise throws anUnknownHostException.
-
-
-
Method Detail
-
isNetworkup
public boolean isNetworkup(boolean useCachedValue) throws java.lang.ExceptionReturnstrueif the network is still up, otherwise throws anUnknownHostException. This tests if the adapter is ready.- Parameters:
useCachedValue- Passtrueif we use the cached value,falseotherwise.- Returns:
- See above.
- Throws:
java.lang.Exception- Thrown if the network is down.
-
isAvailable
public boolean isAvailable() throws java.lang.ExceptionChecks the network is available or not.- Returns:
- See above.
- Throws:
java.lang.Exception- Thrown if an error occurred if we cannot reach.
-
-