Class ServicePortPropertiesFunction

  • All Implemented Interfaces:
    org.apache.camel.spi.PropertiesFunction

    public class ServicePortPropertiesFunction
    extends Object
    implements org.apache.camel.spi.PropertiesFunction
    A PropertiesFunction that lookup the property value from OS environment variables using the service idiom.

    A service is defined using two environment variables where name is name of the service:

    • NAME_SERVICE_HOST
    • NAME_SERVICE_PORT
    in other words the service uses _SERVICE_HOST and _SERVICE_PORT as prefix.

    This implementation is to return the port part only.

    See Also:
    ServicePropertiesFunction, ServiceHostPropertiesFunction
    • Constructor Detail

      • ServicePortPropertiesFunction

        public ServicePortPropertiesFunction()
    • Method Detail

      • getName

        public String getName()
        Specified by:
        getName in interface org.apache.camel.spi.PropertiesFunction
      • apply

        public String apply​(String remainder)
        Specified by:
        apply in interface org.apache.camel.spi.PropertiesFunction