Class YamlEndpoint
java.lang.Object
de.iip_ecosphere.platform.services.spring.yaml.YamlEndpoint
- All Implemented Interfaces:
Endpoint
Represents a communication endpoint.
- Author:
- Holger Eichelberger, SSE
-
Field Summary
FieldsFields inherited from interface de.iip_ecosphere.platform.services.spring.descriptor.Endpoint
HOST_PLACEHOLDER, PORT_PLACEHOLDER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static booleancontainsSafe(String text, String target) Returns whethertextcontainstarget.Returns the specified command line argument to set the host to communicate with for this relation upon service deployment/execution.getHostArg(String hostname) Returns the ready-to.use command line argument to set the host to communicate with for this relation upon service deployment/execution.Returns the specified command line argument to set the communication port for this relation upon service deployment/execution.getPortArg(int port) Returns the ready-to-use command line argument to set the communication port for this relation upon service deployment/execution.booleanReturns the whetherEndpoint.getHostArg()is generic throughEndpoint.HOST_PLACEHOLDER.booleanReturns the whetherEndpoint.getPortArg()is generic throughEndpoint.PORT_PLACEHOLDER.private StringreplaceSafe(String text, String target, String replacement) Replacestargetintextbyreplacement.voidsetHostArg(String hostArg) Defines the command line argument to set the host to communicate with for this relation upon service deployment/execution.voidsetPortArg(String portArg) Defines the command line argument to set the communication port for this relation upon service deployment/execution.
-
Field Details
-
portArg
-
hostArg
-
-
Constructor Details
-
YamlEndpoint
public YamlEndpoint()
-
-
Method Details
-
getPortArg
Description copied from interface:EndpointReturns the specified command line argument to set the communication port for this relation upon service deployment/execution.- Specified by:
getPortArgin interfaceEndpoint- Returns:
- the generic port argument
-
isPortArgGeneric
public boolean isPortArgGeneric()Description copied from interface:EndpointReturns the whetherEndpoint.getPortArg()is generic throughEndpoint.PORT_PLACEHOLDER.- Specified by:
isPortArgGenericin interfaceEndpoint- Returns:
truefor generic,falseelse
-
getPortArg
Description copied from interface:EndpointReturns the ready-to-use command line argument to set the communication port for this relation upon service deployment/execution.- Specified by:
getPortArgin interfaceEndpoint- Parameters:
port- the actual port number- Returns:
- the port argument, "${port}" is substituted by
port
-
getHostArg
Description copied from interface:EndpointReturns the specified command line argument to set the host to communicate with for this relation upon service deployment/execution.- Specified by:
getHostArgin interfaceEndpoint- Returns:
- the generic host argument
-
isHostArgGeneric
public boolean isHostArgGeneric()Description copied from interface:EndpointReturns the whetherEndpoint.getHostArg()is generic throughEndpoint.HOST_PLACEHOLDER.- Specified by:
isHostArgGenericin interfaceEndpoint- Returns:
truefor generic,falseelse
-
getHostArg
Description copied from interface:EndpointReturns the ready-to.use command line argument to set the host to communicate with for this relation upon service deployment/execution.- Specified by:
getHostArgin interfaceEndpoint- Parameters:
hostname- the actual hostname, "${host}" is substituted byhostname, may be empty for localhost- Returns:
- the host argument
-
containsSafe
Returns whethertextcontainstarget.- Parameters:
text- the text to look fortarget- the target to search withintext- Returns:
- if
textandtargetare not null, whethertextcontainstarget
-
replaceSafe
Replacestargetintextbyreplacement.- Parameters:
text- the text to perform the replacement ontarget- the target to search withintextreplacement- the text replacingtarget- Returns:
- if
textis null then an empty string, ifreplacementis nulltextelsetextwithtargetreplaced byreplacement
-
setPortArg
Defines the command line argument to set the communication port for this relation upon service deployment/execution. [Required by SnakeYaml]- Parameters:
portArg- the generic port argument, may contain "${port}"
-
setHostArg
Defines the command line argument to set the host to communicate with for this relation upon service deployment/execution. [Required by SnakeYaml]- Parameters:
hostArg- the host argument, may contain "${host}"
-