Class AbstractAasRestInvocablesCreator

java.lang.Object
de.iip_ecosphere.platform.support.aas.basyx2.AbstractAasRestInvocablesCreator
All Implemented Interfaces:
de.iip_ecosphere.platform.support.aas.InvocablesCreator, Serializable
Direct Known Subclasses:
AasRestInvocablesCreator

public abstract class AbstractAasRestInvocablesCreator extends Object implements de.iip_ecosphere.platform.support.aas.InvocablesCreator, Serializable
Implements an abstract invocables creator for the VAB following the naming conventions of AasOperationsProvider. Function objects as well as class itself must be serializable for remote deployment. Although serializable lambda functions appear feasible, we experienced deserialization problems and rely now on explicit functor instances. Failing operation executions throw the occuring (runtime) exception and require catching them.
Author:
Holger Eichelberger, SSE
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected class 
    Defines a generic, serializable operation.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final long
     

    Fields inherited from interface de.iip_ecosphere.platform.support.aas.InvocablesCreator

    NULL_CREATOR, READ_ONLY, WRITE_ONLY
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract String
    Composes a server URL from the given URL suffix.
    de.iip_ecosphere.platform.support.aas.Invokable
     
    de.iip_ecosphere.platform.support.aas.Invokable
     
    de.iip_ecosphere.platform.support.aas.Invokable
     
    de.iip_ecosphere.platform.support.aas.InvocablesCreator
    executableCreator(de.iip_ecosphere.platform.support.function.IOSupplier<de.iip_ecosphere.platform.support.aas.Aas> aasSupplier, String[] elementPath, Function<String,String> unqualifier)
     
    (package private) static String
    BaSyX2 operates with URLs rather than names.
    protected abstract String
    Returns an identifier for the underlying connection, e.g., host + port.
    protected abstract org.eclipse.digitaltwin.basyx.submodelrepository.client.ConnectedSubmodelRepository
    Returns the submodel repository to delegate calls to.
    protected abstract String
    Returns the submodel repository to delegate calls to.

    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.aas.InvocablesCreator

    setLogLevel
  • Field Details

  • Constructor Details

    • AbstractAasRestInvocablesCreator

      public AbstractAasRestInvocablesCreator()
  • Method Details

    • getId

      protected abstract String getId()
      Returns an identifier for the underlying connection, e.g., host + port.
      Returns:
      the identifier
    • composeUrl

      protected abstract String composeUrl(String suffix)
      Composes a server URL from the given URL suffix.
      Parameters:
      suffix - the URL suffix
      Returns:
      the composed URL
    • getSubmodelRepository

      protected abstract org.eclipse.digitaltwin.basyx.submodelrepository.client.ConnectedSubmodelRepository getSubmodelRepository()
      Returns the submodel repository to delegate calls to.
      Returns:
      the submodel repository
    • getSubmodelRepositoryUrl

      protected abstract String getSubmodelRepositoryUrl()
      Returns the submodel repository to delegate calls to.
      Returns:
      the submodel repository url
    • createGetter

      public de.iip_ecosphere.platform.support.aas.Invokable createGetter(String name)
      Specified by:
      createGetter in interface de.iip_ecosphere.platform.support.aas.InvocablesCreator
    • createSetter

      public de.iip_ecosphere.platform.support.aas.Invokable createSetter(String name)
      Specified by:
      createSetter in interface de.iip_ecosphere.platform.support.aas.InvocablesCreator
    • fixName

      static String fixName(String name)
      BaSyX2 operates with URLs rather than names. Get rid of problematic characters for URL composition.
      Parameters:
      name - the name
      Returns:
      the fixed name
    • createInvocable

      public de.iip_ecosphere.platform.support.aas.Invokable createInvocable(String name)
      Specified by:
      createInvocable in interface de.iip_ecosphere.platform.support.aas.InvocablesCreator
    • executableCreator

      public de.iip_ecosphere.platform.support.aas.InvocablesCreator executableCreator(de.iip_ecosphere.platform.support.function.IOSupplier<de.iip_ecosphere.platform.support.aas.Aas> aasSupplier, String[] elementPath, Function<String,String> unqualifier)
      Specified by:
      executableCreator in interface de.iip_ecosphere.platform.support.aas.InvocablesCreator