Class NetworkManagerAasClient

java.lang.Object
de.iip_ecosphere.platform.support.net.AbstractNetworkManagerImpl
de.iip_ecosphere.platform.support.iip_aas.NetworkManagerAasClient
All Implemented Interfaces:
de.iip_ecosphere.platform.support.net.NetworkManager

public class NetworkManagerAasClient extends de.iip_ecosphere.platform.support.net.AbstractNetworkManagerImpl
Implementing a network manager acting as client for an AAS-based network manager. The AAS shall be provided by NetworkManagerAas.
Author:
Holger Eichelberger, SSE
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private de.iip_ecosphere.platform.support.aas.Submodel
     

    Fields inherited from interface de.iip_ecosphere.platform.support.net.NetworkManager

    PREFIX_SEPARATOR
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a client instance based on a deployed IIP-AAS from AasPartRegistry based on a submodel with name.
    NetworkManagerAasClient(de.iip_ecosphere.platform.support.aas.Submodel submodel)
    Creates a client instance based on the submodel.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    int
     
    de.iip_ecosphere.platform.support.net.ManagedServerAddress
     
    int
     
    boolean
    isInUse(int port)
     
    boolean
    isInUse(de.iip_ecosphere.platform.support.ServerAddress address)
     
    de.iip_ecosphere.platform.support.net.ManagedServerAddress
     
    void
     
    void
     
    de.iip_ecosphere.platform.support.net.ManagedServerAddress
    reservePort(String key, de.iip_ecosphere.platform.support.ServerAddress address)
     
    void
     

    Methods inherited from class de.iip_ecosphere.platform.support.net.AbstractNetworkManagerImpl

    checkAddress, checkKey, configure, getNetmask

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface de.iip_ecosphere.platform.support.net.NetworkManager

    reserveGlobalPort
  • Field Details

    • submodel

      private de.iip_ecosphere.platform.support.aas.Submodel submodel
  • Constructor Details

    • NetworkManagerAasClient

      public NetworkManagerAasClient() throws IOException
      Creates a client instance based on a deployed IIP-AAS from AasPartRegistry based on a submodel with name.
      Throws:
      IOException - if retrieving the IIP-AAS or the respective submodel fails
    • NetworkManagerAasClient

      public NetworkManagerAasClient(de.iip_ecosphere.platform.support.aas.Submodel submodel)
      Creates a client instance based on the submodel. The submodel shall conform to NetworkManagerAas with respect to the operations, signatures, but also the name,
      Parameters:
      submodel - the submodel to use
  • Method Details

    • obtainPort

      public de.iip_ecosphere.platform.support.net.ManagedServerAddress obtainPort(String key)
    • getPort

      public de.iip_ecosphere.platform.support.net.ManagedServerAddress getPort(String key)
    • reservePort

      public de.iip_ecosphere.platform.support.net.ManagedServerAddress reservePort(String key, de.iip_ecosphere.platform.support.ServerAddress address)
    • releasePort

      public void releasePort(String key)
    • isInUse

      public boolean isInUse(de.iip_ecosphere.platform.support.ServerAddress address)
    • isInUse

      public boolean isInUse(int port)
    • getLowPort

      public int getLowPort()
      Specified by:
      getLowPort in interface de.iip_ecosphere.platform.support.net.NetworkManager
      Overrides:
      getLowPort in class de.iip_ecosphere.platform.support.net.AbstractNetworkManagerImpl
    • getHighPort

      public int getHighPort()
      Specified by:
      getHighPort in interface de.iip_ecosphere.platform.support.net.NetworkManager
      Overrides:
      getHighPort in class de.iip_ecosphere.platform.support.net.AbstractNetworkManagerImpl
    • registerInstance

      public void registerInstance(String key, String hostId)
    • unregisterInstance

      public void unregisterInstance(String key, String hostId)
    • getRegisteredInstances

      public int getRegisteredInstances(String key)