Class YamlRelation
- java.lang.Object
-
- de.iip_ecosphere.platform.services.spring.yaml.YamlRelation
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.iip_ecosphere.platform.services.spring.descriptor.Relation
Relation.Direction
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringchannelprivate java.lang.Stringdescriptionprivate Relation.Directiondirectionprivate YamlEndpointendpointprivate java.lang.Stringfunctionprivate java.lang.Stringidprivate java.lang.Stringserviceprivate java.lang.Stringtype-
Fields inherited from interface de.iip_ecosphere.platform.services.spring.descriptor.Relation
LOCAL_CHANNEL
-
-
Constructor Summary
Constructors Constructor Description YamlRelation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetChannel()Returns the name of the communication channel this relation is realized by.java.lang.StringgetDescription()Returns the description of the relation.Relation.DirectiongetDirection()Returns the direction of the relation.YamlEndpointgetEndpoint()Returns communication endpoint (port/host) the service shall communicate with.java.lang.StringgetFunction()Returns the function at the containing service associated with this relation.java.lang.StringgetId()The id of the relation.java.lang.StringgetService()The id of the service this relation is connecting to.java.lang.StringgetType()Returns the type of the data.java.lang.String[]getTypes()Returns the types of data.voidsetChannel(java.lang.String channel)Defines the name of the communication channel this relation is realized by.voidsetDescription(java.lang.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(java.lang.String function)Defines the function at the containing service associated with this relation.voidsetId(java.lang.String id)Defines the id of this relation.voidsetService(java.lang.String service)Defines the name of the communication channel this relation is realized by.voidsetType(java.lang.String type)Defines the type of the data.
-
-
-
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
-
endpoint
private YamlEndpoint endpoint
-
description
private java.lang.String description
-
type
private java.lang.String type
-
direction
private Relation.Direction direction
-
-
Method Detail
-
getId
public java.lang.String 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
public java.lang.String 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
public java.lang.String 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
public java.lang.String 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
public YamlEndpoint 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
public java.lang.String getDescription()
Description copied from interface:RelationReturns the description of the relation.- Specified by:
getDescriptionin interfaceRelation- Returns:
- the description, may be empty
-
getType
public java.lang.String 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
public java.lang.String[] getTypes()
Description copied from interface:RelationReturns the types of data.Relation.getType()parsed into potentially many types}.
-
getDirection
public Relation.Direction 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
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 ifis emptyor 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 beRelation.LOCAL_CHANNELreferring 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 ifis emptyor 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
-
-