Class EndpointHolder


public class EndpointHolder extends TlsServerAddressHolder
A proxy for Endpoint as we do not want to have setters there.
Author:
Holger Eichelberger, SSE
  • Field Details

    • path

      private String path
    • idStorePrefix

      private String idStorePrefix
    • ignorePath

      private boolean ignorePath
    • validator

      private transient EndpointValidator validator
  • Constructor Details

    • EndpointHolder

      public EndpointHolder()
      Creates an instance (deserialization).
    • EndpointHolder

      public EndpointHolder(de.iip_ecosphere.platform.support.Schema schema, String host, int port, String path)
      Creates an instance.
      Parameters:
      schema - the schema
      host - the host name
      port - the port
      path - the path denoting the endpoint
    • EndpointHolder

      public EndpointHolder(de.iip_ecosphere.platform.support.Endpoint endpoint)
      Creates an instance from a given instance (serialization).
      Parameters:
      endpoint - the instance to take data from
    • EndpointHolder

      public EndpointHolder(EndpointHolder holder)
      Creates an instance by copying data from a given instance. Does not copy the validator. Takes over whether paths shall be ignored.
      Parameters:
      holder - the holder to copy from
  • Method Details

    • setValidator

      public void setValidator(EndpointValidator validator)
      Defines an endpoint validator which may change some of the getter results.
      Parameters:
      validator - the validator
    • getPath

      public String getPath()
      Returns the endpoint name/path.
      Returns:
      the endpoint name/path
    • ignorePath

      public EndpointHolder ignorePath(boolean ignorePath)
      Allows ignoring the specified path, then always returning an empty path.
      Parameters:
      ignorePath - whether the path shall be ignored
      Returns:
      this for chaining
    • setPath

      public void setPath(String path)
      Defines the endpoint name/path. [required by data mapper]
      Parameters:
      path - the endpoint name/path
    • getPort

      public int getPort()
      Returns the port value.
      Overrides:
      getPort in class ServerAddressHolder
      Returns:
      the port (may be negative, indicates ephemerial)
    • getHost

      public String getHost()
      Returns the host value.
      Overrides:
      getHost in class ServerAddressHolder
      Returns:
      the host
    • getSchema

      public de.iip_ecosphere.platform.support.Schema getSchema()
      Returns the schema value.
      Overrides:
      getSchema in class ServerAddressHolder
      Returns:
      the schema
    • getEndpoint

      public de.iip_ecosphere.platform.support.Endpoint getEndpoint()
      Returns an endpoint instance constructed from the data in this instance.
      Returns:
      the endpoint
    • getAuthentication

      public de.iip_ecosphere.platform.support.aas.AuthenticationDescriptor getAuthentication()
      Returns the authentication descriptor.
      Returns:
      the authentication descriptor, null for none