Class ConnectorParameter


  • public class ConnectorParameter
    extends java.lang.Object
    Defines the connection parameters for a Connector. Specific connectors shall document required parameter.
    Author:
    Holger Eichelberger, SSE
    • Field Detail

      • DEFAULT_SCHEMA

        public static final de.iip_ecosphere.platform.support.Schema DEFAULT_SCHEMA
      • DEFAULT_REQUEST_TIMEOUT

        public static final int DEFAULT_REQUEST_TIMEOUT
        See Also:
        Constant Field Values
      • DEFAULT_NOTIFICATION_INTERVAL

        public static final int DEFAULT_NOTIFICATION_INTERVAL
        See Also:
        Constant Field Values
      • identityToken

        private java.util.Map<java.lang.String,​de.iip_ecosphere.platform.support.identities.IdentityToken> identityToken
      • schema

        private de.iip_ecosphere.platform.support.Schema schema
      • port

        private int port
      • host

        private java.lang.String host
      • requestTimeout

        private int requestTimeout
      • endpointPath

        private java.lang.String endpointPath
      • applicationId

        private java.lang.String applicationId
      • autoApplicationId

        private boolean autoApplicationId
      • applicationDescription

        private java.lang.String applicationDescription
      • notificationInterval

        private int notificationInterval
      • keepAlive

        private int keepAlive
      • keystoreKey

        private java.lang.String keystoreKey
      • keyAlias

        private java.lang.String keyAlias
      • hostnameVerification

        private boolean hostnameVerification
      • service

        private de.iip_ecosphere.platform.support.iip_aas.NameplateSetup.Service service
    • Constructor Detail

      • ConnectorParameter

        private ConnectorParameter​(java.lang.String host,
                                   int port)
        Creates a connector parameter instance.
        Parameters:
        port - the port to connect to
        host - the host to connect to
    • Method Detail

      • getIdentityToken

        public de.iip_ecosphere.platform.support.identities.IdentityToken getIdentityToken​(java.lang.String endpointUrl)
        Returns the identity token.
        Parameters:
        endpointUrl - the endpoint URL to return the token for
        Returns:
        the identity token (may be null for anonymous identity)
      • isAnonymousIdentity

        public boolean isAnonymousIdentity()
        Returns whether there is any identity or the client just runs in anonymous mode.
        Returns:
        true for totally anonymous, false for at least some identities
      • isFeasibleEndpoint

        public boolean isFeasibleEndpoint​(java.lang.String endpointUrl,
                                          byte securityLevel)
        Helps determining in case of multiple endpoint URLs which ones are more feasible. Might not be used by all connector implementations.
        Parameters:
        endpointUrl - the endpoint URL in question
        securityLevel - connector specific information about the security level
        Returns:
        true for feasible (default), false else
      • getSchema

        public de.iip_ecosphere.platform.support.Schema getSchema()
        The connection schema.
        Returns:
        the schema (default DEFAULT_SCHEMA)
      • getPort

        public int getPort()
        The connection port.
        Returns:
        the connection port
      • getHost

        public java.lang.String getHost()
        Returns the server host.
        Returns:
        the server host name
      • getEndpointPath

        public java.lang.String getEndpointPath()
        Returns the base URL prefix path/endpoint URL.
        Returns:
        the base URL prefix/endpoint URL
      • getApplicationId

        public java.lang.String getApplicationId()
        String/URL to identify the application. Connector-dependent.
        Returns:
        the identifier
      • getApplicationDescription

        public java.lang.String getApplicationDescription()
        Application description. Connector-dependent.
        Returns:
        the description
      • getRequestTimeout

        public int getRequestTimeout()
        Returns the request timeout.
        Returns:
        the request timeout in ms
      • getNotificationInterval

        public int getNotificationInterval()
        Returns the notification interval, i.e., how frequently the connector shall look for new values. This may happen via events, notifications or polling depending on the connector implementation.
        Returns:
        the interval in ms, deactivated if less than 1
      • getKeepAlive

        public int getKeepAlive()
        Returns the time to keep a connection alive.
        Returns:
        the time in milliseconds
      • getAutoApplicationId

        public boolean getAutoApplicationId()
        Returns whether the application identification is expected to be unique or shall be made unique upon first connect. May be ignored if not applicable.
        Returns:
        true (default) for make unique, false else
      • getKeystoreKey

        public java.lang.String getKeystoreKey()
        Returns the optional key to access the TLS keystore key to be obtained from IdentityStore.
        Returns:
        the (logical) key to access the keystore, may be null for none
      • getKeyAlias

        public java.lang.String getKeyAlias()
        Returns the alias of the key in getKeystoreKey() to use.
        Returns:
        the alias or null for none/first match
      • getHostnameVerification

        public boolean getHostnameVerification()
        Returns whether TLS hostname verification shall be performed.
        Returns:
        false for no verification (default), true else
      • getService

        public de.iip_ecosphere.platform.support.iip_aas.NameplateSetup.Service getService()
        Returns the device service information this connector shall connect to.
        Returns:
        the device service information, may be null