Class ServiceHostPropertiesFunction

java.lang.Object
org.apache.camel.component.properties.ServiceHostPropertiesFunction
All Implemented Interfaces:
org.apache.camel.spi.PropertiesFunction

public class ServiceHostPropertiesFunction 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 host part only.

See Also:
  • Constructor Details

    • ServiceHostPropertiesFunction

      public ServiceHostPropertiesFunction()
  • Method Details

    • 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