Class YamlRelation

  • All Implemented Interfaces:
    Relation

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

    • Constructor Summary

      Constructors 
      Constructor Description
      YamlRelation()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getChannel()
      Returns the name of the communication channel this relation is realized by.
      java.lang.String getDescription()
      Returns the description of the relation.
      Relation.Direction getDirection()
      Returns the direction of the relation.
      YamlEndpoint getEndpoint()
      Returns communication endpoint (port/host) the service shall communicate with.
      java.lang.String getFunction()
      Returns the function at the containing service associated with this relation.
      java.lang.String getId()
      The id of the relation.
      java.lang.String getService()
      The id of the service this relation is connecting to.
      java.lang.String getType()
      Returns the type of the data.
      java.lang.String[] getTypes()
      Returns the types of data.
      void setChannel​(java.lang.String channel)
      Defines the name of the communication channel this relation is realized by.
      void setDescription​(java.lang.String description)
      Defines the description of the relation.
      void setDirection​(Relation.Direction direction)
      Defines the direction of the relation.
      void setEndpoint​(YamlEndpoint endpoint)
      Defines communication endpoint (port/host) the service shall communicate with.
      void setFunction​(java.lang.String function)
      Defines the function at the containing service associated with this relation.
      void setId​(java.lang.String id)
      Defines the id of this relation.
      void setService​(java.lang.String service)
      Defines the name of the communication channel this relation is realized by.
      void setType​(java.lang.String type)
      Defines the type of the data.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • id

        private java.lang.String id
      • channel

        private java.lang.String channel
      • service

        private java.lang.String service
      • function

        private java.lang.String function
      • description

        private java.lang.String description
      • type

        private java.lang.String type
    • Constructor Detail

      • YamlRelation

        public YamlRelation()
    • Method Detail

      • getId

        public java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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
      • setId

        public void setId​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.String description)
        Defines the description of the relation. [required by SnakeYaml]
        Parameters:
        description - the description
      • setType

        public void setType​(java.lang.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