All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.snapscript.studio.agent.runtime.HostAddressValue Maven / Gradle / Ivy

The newest version!
package org.snapscript.studio.agent.runtime;

import static org.snapscript.studio.agent.runtime.RuntimeAttribute.HOST;

import java.net.InetAddress;

public class HostAddressValue implements RuntimeValue {

   @Override
   public String getName() {
      return HOST.name;
   }

   @Override
   public String getValue() {
      try {
         return InetAddress.getLocalHost().getCanonicalHostName();
      } catch(Exception e) {
         e.printStackTrace();
      }
      return null;
   }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy