Package org.eclipse.hono.config
Class MapperEndpoint
- java.lang.Object
-
- org.eclipse.hono.config.MapperEndpoint
-
public final class MapperEndpoint extends Object
Configuration class for custom mappers.
-
-
Constructor Summary
Constructors Constructor Description MapperEndpoint()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MapperEndpoint
from(String host, int port, String uri, boolean tlsEnabled)
Generate a mapperEndpoint from the given parameters.String
getHost()
Gets the host name or IP address of this mapper.Integer
getPort()
Gets the port of this mapper.String
getUri()
Gets the uri of this mapper.boolean
isTlsEnabled()
Checks whether the connection to the message mapping service is secured using TLS.void
setHost(String host)
Sets the host name or IP address of this mapper.void
setPort(Integer port)
Sets the port of this mapper.void
setTlsEnabled(Boolean flag)
Sets whether the connection to the message mapping service should be secured using TLS.void
setUri(String uri)
Sets the uri of this mapper.
-
-
-
Method Detail
-
getHost
public String getHost()
Gets the host name or IP address of this mapper.- Returns:
- The host name.
-
setHost
public void setHost(String host)
Sets the host name or IP address of this mapper.- Parameters:
host
- The host name or IP address.- Throws:
NullPointerException
- if host isnull
.
-
getPort
public Integer getPort()
Gets the port of this mapper.- Returns:
- the port.
-
setPort
public void setPort(Integer port)
Sets the port of this mapper.- Parameters:
port
- The port.- Throws:
NullPointerException
- if port isnull
.
-
getUri
public String getUri()
Gets the uri of this mapper.- Returns:
- the uri.
-
setUri
public void setUri(String uri)
Sets the uri of this mapper.- Parameters:
uri
- The uri.- Throws:
NullPointerException
- if uri isnull
.
-
isTlsEnabled
public boolean isTlsEnabled()
Checks whether the connection to the message mapping service is secured using TLS.The default value of this property is
true
.- Returns:
true
if the connection to the mapper is secured using TLS.
-
setTlsEnabled
public void setTlsEnabled(Boolean flag)
Sets whether the connection to the message mapping service should be secured using TLS.The default value of this property is
true
.- Parameters:
flag
-true
if the connection to the mapper should be secured using TLS.- Throws:
NullPointerException
- if ssl isnull
.
-
from
public static MapperEndpoint from(String host, int port, String uri, boolean tlsEnabled)
Generate a mapperEndpoint from the given parameters.- Parameters:
host
- The host on which the mapper service is listeningport
- The port on which the mapper service is listeninguri
- The uri on which the mapper service is listeningtlsEnabled
- Whether or not this connection is secure- Returns:
- The constructed mapperEndpoint
-
-