java.lang.Object
de.iip_ecosphere.platform.services.spring.yaml.YamlRelation
All Implemented Interfaces:
Relation

public class YamlRelation extends Object implements Relation
Represents a relation/connection between services. [Name taken from usage view]
Author:
Holger Eichelberger, SSE
  • Field Details

  • Constructor Details

    • YamlRelation

      public YamlRelation()
  • Method Details

    • getId

      public String getId()
      Description copied from interface: Relation
      The id of the relation. All relation entries of all participating services must have the same id. Depending on the underlying implementation, id may be the same as Relation.getChannel() or differ, e.g, if Relation.getChannel() points to a technical channel name.
      Specified by:
      getId in interface Relation
      Returns:
      the id of the channel, may be empty if is empty or in case of an outgoing data port, must be given for an opposite side data port.
    • getChannel

      public String getChannel()
      Description copied from interface: Relation
      Returns the name of the communication channel this relation is realized by. Channel names may be used to query host and port via NetworkManager.
      Specified by:
      getChannel in interface Relation
      Returns:
      the channel name, may be Relation.LOCAL_CHANNEL referring to all channels used for local communication
    • getService

      public String getService()
      Description copied from interface: Relation
      The id of the service this relation is connecting to.
      Specified by:
      getService in interface Relation
      Returns:
      the id of the service, may be empty if is empty or in case of an outgoing data port, must be given to denote the service holding an opposite side incoming data port.
    • getFunction

      public String getFunction()
      Description copied from interface: Relation
      Returns the function at the containing service associated with this relation.
      Specified by:
      getFunction in interface Relation
      Returns:
      the function name (may be null or empty for implicit functions that shall not be exibited)
    • getEndpoint

      public YamlEndpoint getEndpoint()
      Description copied from interface: Relation
      Returns communication endpoint (port/host) the service shall communicate with.
      Specified by:
      getEndpoint in interface Relation
      Returns:
      the communication endpoint (may be null for internal relations}
    • getDescription

      public String getDescription()
      Description copied from interface: Relation
      Returns the description of the relation.
      Specified by:
      getDescription in interface Relation
      Returns:
      the description, may be empty
    • getType

      public String getType()
      Description copied from interface: Relation
      Returns the type of the data. May be multiple types, separated by commas.
      Specified by:
      getType in interface Relation
      Returns:
      the type as qualified Java name (may be null for the relation with empty Relation.getChannel()
    • getTypes

      public String[] getTypes()
      Description copied from interface: Relation
      Returns the types of data. Relation.getType() parsed into potentially many types}.
      Specified by:
      getTypes in interface Relation
      Returns:
      the types, may contain just a single value
    • getDirection

      public Relation.Direction getDirection()
      Description copied from interface: Relation
      Returns the direction of the relation.
      Specified by:
      getDirection in interface Relation
      Returns:
      the direction (may be null for the relation with empty Relation.getChannel()
    • setId

      public void setId(String id)
      Defines the id of this relation. [Required by SnakeYaml]
      Parameters:
      id - the id of the channel, may be empty if is empty or in case of an outgoing data port, must be given for an opposite side data port.
    • setChannel

      public void setChannel(String channel)
      Defines the name of the communication channel this relation is realized by. [Required by SnakeYaml]
      Parameters:
      channel - the channel name, may be Relation.LOCAL_CHANNEL referring to all channels used for local communication
    • setService

      public void setService(String service)
      Defines the name of the communication channel this relation is realized by. [Required by SnakeYaml]
      Parameters:
      service - the id of the service, may be empty if is empty or in case of an outgoing data port, must be given to denote the service holding an opposite side incoming data port.
    • setFunction

      public void setFunction(String function)
      Defines the function at the containing service associated with this relation.
      Parameters:
      function - the function name
    • setEndpoint

      public void setEndpoint(YamlEndpoint endpoint)
      Defines communication endpoint (port/host) the service shall communicate with.
      Parameters:
      endpoint - the communication endpoint
    • setDescription

      public void setDescription(String description)
      Defines the description of the relation. [required by SnakeYaml]
      Parameters:
      description - the description
    • setType

      public void setType(String type)
      Defines the type of the data. [required by SnakeYaml]
      Parameters:
      type - the type as qualified Java name
    • setDirection

      public void setDirection(Relation.Direction direction)
      Defines the direction of the relation. [required by SnakeYaml]
      Parameters:
      direction - the direction