Class YamlRelation
java.lang.Object
de.iip_ecosphere.platform.services.spring.yaml.YamlRelation
- All Implemented Interfaces:
Relation
Represents a relation/connection between services. [Name taken from usage view]
- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.iip_ecosphere.platform.services.spring.descriptor.Relation
Relation.Direction -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate Stringprivate Relation.Directionprivate YamlEndpointprivate Stringprivate Stringprivate Stringprivate StringFields inherited from interface de.iip_ecosphere.platform.services.spring.descriptor.Relation
LOCAL_CHANNEL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the name of the communication channel this relation is realized by.Returns the description of the relation.Returns the direction of the relation.Returns communication endpoint (port/host) the service shall communicate with.Returns the function at the containing service associated with this relation.getId()The id of the relation.The id of the service this relation is connecting to.getType()Returns the type of the data.String[]getTypes()Returns the types of data.voidsetChannel(String channel) Defines the name of the communication channel this relation is realized by.voidsetDescription(String description) Defines the description of the relation.voidsetDirection(Relation.Direction direction) Defines the direction of the relation.voidsetEndpoint(YamlEndpoint endpoint) Defines communication endpoint (port/host) the service shall communicate with.voidsetFunction(String function) Defines the function at the containing service associated with this relation.voidDefines the id of this relation.voidsetService(String service) Defines the name of the communication channel this relation is realized by.voidDefines the type of the data.
-
Field Details
-
id
-
channel
-
service
-
function
-
endpoint
-
description
-
type
-
direction
-
-
Constructor Details
-
YamlRelation
public YamlRelation()
-
-
Method Details
-
getId
Description copied from interface:RelationThe 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 asRelation.getChannel()or differ, e.g, ifRelation.getChannel()points to a technical channel name. -
getChannel
Description copied from interface:RelationReturns the name of the communication channel this relation is realized by. Channel names may be used to query host and port viaNetworkManager.- Specified by:
getChannelin interfaceRelation- Returns:
- the channel name, may be
Relation.LOCAL_CHANNELreferring to all channels used for local communication
-
getService
Description copied from interface:RelationThe id of the service this relation is connecting to.- Specified by:
getServicein interfaceRelation- Returns:
- the id of the service, may be empty if
is emptyor in case of an outgoing data port, must be given to denote the service holding an opposite side incoming data port.
-
getFunction
Description copied from interface:RelationReturns the function at the containing service associated with this relation.- Specified by:
getFunctionin interfaceRelation- Returns:
- the function name (may be null or empty for implicit functions that shall not be exibited)
-
getEndpoint
Description copied from interface:RelationReturns communication endpoint (port/host) the service shall communicate with.- Specified by:
getEndpointin interfaceRelation- Returns:
- the communication endpoint (may be null for internal relations}
-
getDescription
Description copied from interface:RelationReturns the description of the relation.- Specified by:
getDescriptionin interfaceRelation- Returns:
- the description, may be empty
-
getType
Description copied from interface:RelationReturns the type of the data. May be multiple types, separated by commas.- Specified by:
getTypein interfaceRelation- Returns:
- the type as qualified Java name (may be null for the relation with empty
Relation.getChannel()
-
getTypes
Description copied from interface:RelationReturns the types of data.Relation.getType()parsed into potentially many types}. -
getDirection
Description copied from interface:RelationReturns the direction of the relation.- Specified by:
getDirectionin interfaceRelation- Returns:
- the direction (may be null for the relation with empty
Relation.getChannel()
-
setId
Defines the id of this relation. [Required by SnakeYaml]- Parameters:
id- the id of the channel, may be empty ifis emptyor in case of an outgoing data port, must be given for an opposite side data port.
-
setChannel
Defines the name of the communication channel this relation is realized by. [Required by SnakeYaml]- Parameters:
channel- the channel name, may beRelation.LOCAL_CHANNELreferring to all channels used for local communication
-
setService
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 ifis emptyor in case of an outgoing data port, must be given to denote the service holding an opposite side incoming data port.
-
setFunction
Defines the function at the containing service associated with this relation.- Parameters:
function- the function name
-
setEndpoint
Defines communication endpoint (port/host) the service shall communicate with.- Parameters:
endpoint- the communication endpoint
-
setDescription
Defines the description of the relation. [required by SnakeYaml]- Parameters:
description- the description
-
setType
Defines the type of the data. [required by SnakeYaml]- Parameters:
type- the type as qualified Java name
-
setDirection
Defines the direction of the relation. [required by SnakeYaml]- Parameters:
direction- the direction
-