Package org.openmuc.jeebus.ship.api
Class ShipNodeConfiguration
- java.lang.Object
-
- org.openmuc.jeebus.ship.api.ShipNodeConfiguration
-
public class ShipNodeConfiguration extends java.lang.Objectbig POJO that holds all relevant library configuration
-
-
Constructor Summary
Constructors Constructor Description ShipNodeConfiguration(int port, java.lang.String wssPath, boolean keepAlive, java.lang.String serviceId, java.lang.String serviceDomain, java.lang.String serviceInstance, java.lang.String alias, char[] keyStorePassphrase, char[] keyPairPassphrase, java.lang.String distinguishedName, int certificateValidityInDays)ShipNodeConfiguration(int port, java.lang.String wssPath, boolean keepAlive, java.lang.String serviceId, java.lang.String serviceDomain, java.lang.String serviceInstance, java.lang.String alias, java.lang.String certPath, char[] keyStorePassphrase, char[] keyPairPassphrase, java.lang.String distinguishedName, int certificateValidityInDays)ShipNodeConfiguration(java.lang.String ipAddress, int port, java.lang.String wssPath, boolean keepAlive, java.lang.String serviceId, java.lang.String serviceDomain, java.lang.String serviceInstance, java.lang.String alias, char[] keyStorePassphrase, char[] keyPairPassphrase, java.lang.String distinguishedName, int certificateValidityInDays)ShipNodeConfiguration(java.lang.String ipAddress, int port, java.lang.String wssPath, boolean keepAlive, java.lang.String serviceId, java.lang.String serviceDomain, java.lang.String serviceInstance, java.lang.String alias, java.lang.String certPath, char[] keyStorePassphrase, char[] keyPairPassphrase, java.lang.String distinguishedName, int certificateValidityInDays)ShipNodeConfiguration(java.util.Set<java.lang.String> ipAddresses, int port, java.lang.String wssPath, boolean keepAlive, java.lang.String serviceId, java.lang.String serviceDomain, java.lang.String serviceInstance, java.lang.String alias, char[] keyStorePassphrase, char[] keyPairPassphrase, java.lang.String distinguishedName, int certificateValidityInDays)Wrapper class for parameters for initial ship node configuration.ShipNodeConfiguration(java.util.Set<java.lang.String> ipAddresses, int port, java.lang.String wssPath, boolean keepAlive, java.lang.String serviceId, java.lang.String serviceDomain, java.lang.String serviceInstance, java.lang.String alias, java.lang.String certPath, char[] keyStorePassphrase, char[] keyPairPassphrase, java.lang.String distinguishedName, int certificateValidityInDays)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.StringgetAlias()intgetCertificateValidityInDays()java.lang.StringgetCertPath()java.lang.StringgetDistinguishedName()java.net.InetAddressgetIpAddress()Deprecated.because binding to multiple addresses is supported.java.util.Set<java.net.InetAddress>getIpAddresses()char[]getKeyPairPassphrase()char[]getKeyStorePassphrase()intgetPort()java.lang.StringgetServiceDomain()java.lang.StringgetServiceId()java.lang.StringgetServiceInstance()java.lang.StringgetWssPath()booleanisClientOnly()booleanisKeepAlive()voidsetAlias(java.lang.String alias)voidsetCertPath(java.lang.String certPath)voidsetClientOnly(boolean clientOnly)voidsetIpAddress(java.net.InetAddress ipAddress)Deprecated.because binding to multiple addresses is supported.voidsetIpAddresses(java.util.Set<java.net.InetAddress> ipAddresses)voidsetKeepAlive(boolean keepAlive)voidsetPort(int port)voidsetServiceDomain(java.lang.String serviceDomain)voidsetServiceId(java.lang.String serviceId)voidsetServiceInstance(java.lang.String serviceInstance)voidsetWssPath(java.lang.String wssPath)java.lang.StringtoString()
-
-
-
Constructor Detail
-
ShipNodeConfiguration
public ShipNodeConfiguration(java.util.Set<java.lang.String> ipAddresses, int port, java.lang.String wssPath, boolean keepAlive, java.lang.String serviceId, java.lang.String serviceDomain, java.lang.String serviceInstance, java.lang.String alias, char[] keyStorePassphrase, char[] keyPairPassphrase, java.lang.String distinguishedName, int certificateValidityInDays)Wrapper class for parameters for initial ship node configuration. If a certificate should be loaded or stored, use the other constructor instead- Parameters:
ipAddresses- ip addresses of network interfaces to bind this Ship node to, example: ["192.168.1.2" /* ethernet * /, "::1" /* loopback * /]port- port for initial serverwssPath- wss path for initial server, example: "/ship/"keepAlive- indicates if keepAlive packets are allowedserviceId- host name for JmDNS instance (service discovery), example: "EXAMPLEBRAND-EEB01M3EU-001122334455"serviceDomain- which domain for service types to listen to, example: "local"serviceInstance- service instance label for initial server, example: "Dishwasher ExampleCompany EEB01M3EU"alias- the alias for the key pair that should be loaded or createdkeyStorePassphrase- passphrase for the whole key store, see KeyManagement classkeyPairPassphrase- passphrase for the key pair to be generateddistinguishedName- X.509 Distinguished Name, eg "CN=Test, L=London, C=GB". For IoT devices, usually the DeviceIDcertificateValidityInDays- how many days the certificate should be valid for
-
ShipNodeConfiguration
public ShipNodeConfiguration(java.lang.String ipAddress, int port, java.lang.String wssPath, boolean keepAlive, java.lang.String serviceId, java.lang.String serviceDomain, java.lang.String serviceInstance, java.lang.String alias, char[] keyStorePassphrase, char[] keyPairPassphrase, java.lang.String distinguishedName, int certificateValidityInDays)
-
ShipNodeConfiguration
public ShipNodeConfiguration(java.lang.String ipAddress, int port, java.lang.String wssPath, boolean keepAlive, java.lang.String serviceId, java.lang.String serviceDomain, java.lang.String serviceInstance, java.lang.String alias, java.lang.String certPath, char[] keyStorePassphrase, char[] keyPairPassphrase, java.lang.String distinguishedName, int certificateValidityInDays)SeeShipNodeConfiguration. This constructor additionally takes a path pointing to an existing certificate, and an ipAddress. For example: "certs/keystore.jks" or "C:/User/Test/certs/keystore.jks". If there is no certificate found at the location, a new certificate will be created in theShipNodeclass at the location- Parameters:
ipAddress- IP address of network interface to bind this Ship node to, example: "192.168.1.2". If set to "0.0.0.0" this Ship node will bind to all available network interfaces.port- port for initial serverwssPath- wss path for initial server, example: "/ship/"keepAlive- indicates if keepAlive packets are allowedserviceId- host name for JmDNS instance (service discovery), example: "EXAMPLEBRAND-EEB01M3EU-001122334455"serviceDomain- which domain for service types to listen to, example: "local"serviceInstance- service instance label for initial server, example: "Dishwasher ExampleCompany EEB01M3EU"alias- the alias for the key pair that should be loaded or createdcertPath- path pointing to an existing certificatekeyStorePassphrase- passphrase for the whole key store, see KeyManagement classkeyPairPassphrase- passphrase for the key pair to be generateddistinguishedName- X.509 Distinguished Name, eg "CN=Test, L=London, C=GB". For IoT devices, usually the DeviceIDcertificateValidityInDays- how many days the certificate should be valid for
-
ShipNodeConfiguration
public ShipNodeConfiguration(java.util.Set<java.lang.String> ipAddresses, int port, java.lang.String wssPath, boolean keepAlive, java.lang.String serviceId, java.lang.String serviceDomain, java.lang.String serviceInstance, java.lang.String alias, java.lang.String certPath, char[] keyStorePassphrase, char[] keyPairPassphrase, java.lang.String distinguishedName, int certificateValidityInDays)SeeShipNodeConfiguration. This constructor additionally takes a path pointing to an existing certificate, and an ipAddress. For example: "certs/keystore.jks" or "C:/User/Test/certs/keystore.jks". If there is no certificate found at the location, a new certificate will be created in theShipNodeImplclass at the location- Parameters:
ipAddresses- ip addresses of network interfaces to bind this Ship node to, example: ["192.168.1.2" /* ethernet * /, "::1" /* loopback * /]port- port for initial serverwssPath- wss path for initial server, example: "/ship/"keepAlive- indicates if keepAlive packets are allowedserviceId- host name for JmDNS instance (service discovery), example: "EXAMPLEBRAND-EEB01M3EU-001122334455"serviceDomain- which domain for service types to listen to, example: "local"serviceInstance- service instance label for initial server, example: "Dishwasher ExampleCompany EEB01M3EU"alias- the alias for the key pair that should be loaded or createdcertPath- path pointing to an existing certificatekeyStorePassphrase- passphrase for the whole key store, see KeyManagement classkeyPairPassphrase- passphrase for the key pair to be generateddistinguishedName- X.509 Distinguished Name, eg "CN=Test, L=London, C=GB". For IoT devices, usually the DeviceIDcertificateValidityInDays- how many days the certificate should be valid for
-
ShipNodeConfiguration
public ShipNodeConfiguration(int port, java.lang.String wssPath, boolean keepAlive, java.lang.String serviceId, java.lang.String serviceDomain, java.lang.String serviceInstance, java.lang.String alias, java.lang.String certPath, char[] keyStorePassphrase, char[] keyPairPassphrase, java.lang.String distinguishedName, int certificateValidityInDays)SeeShipNodeConfiguration. This constructor additionally takes a path pointing to an existing certificate and sets the ipAddress to null. For example: "certs/keystore.jks" or "C:/User/Test/certs/keystore.jks". If there is no certificate found at the location, a new certificate will be created in theShipNodeclass at the location. Wrapper class for parameters for initial ship node configuration. If a certificate should be loaded or stored, use the other constructor instead- Parameters:
port- port for initial serverwssPath- wss path for initial server, example: "/ship/"keepAlive- indicates if keepAlive packets are allowedserviceId- host name for JmDNS instance (service discovery), example: "EXAMPLEBRAND-EEB01M3EU-001122334455"serviceDomain- which domain for service types to listen to, example: "local"serviceInstance- service instance label for initial server, example: "Dishwasher ExampleCompany EEB01M3EU"alias- the alias for the key pair that should be loaded or createdcertPath- path pointing to an existing certificatekeyStorePassphrase- passphrase for the whole key store, see KeyManagement classkeyPairPassphrase- passphrase for the key pair to be generateddistinguishedName- X.509 Distinguished Name, eg "CN=Test, L=London, C=GB". For IoT devices, usually the DeviceIDcertificateValidityInDays- how many days the certificate should be valid for
-
ShipNodeConfiguration
public ShipNodeConfiguration(int port, java.lang.String wssPath, boolean keepAlive, java.lang.String serviceId, java.lang.String serviceDomain, java.lang.String serviceInstance, java.lang.String alias, char[] keyStorePassphrase, char[] keyPairPassphrase, java.lang.String distinguishedName, int certificateValidityInDays)SeeShipNodeConfiguration. this constructor sets the ipAddress to null, so the ShipNode will take the IP address of an arbitrary network interface to bind the connection to.- Parameters:
port- port for initial serverwssPath- wss path for initial server, example: "/ship/"keepAlive- indicates if keepAlive packets are allowedserviceId- host name for JmDNS instance (service discovery), example: "EXAMPLEBRAND-EEB01M3EU-001122334455"serviceDomain- which domain for service types to listen to, example: "local"serviceInstance- service instance label for initial server, example: "Dishwasher ExampleCompany EEB01M3EU"alias- the alias for the key pair that should be loaded or createdkeyStorePassphrase- passphrase for the whole key store, see KeyManagement classkeyPairPassphrase- passphrase for the key pair to be generateddistinguishedName- X.509 Distinguished Name, eg "CN=Test, L=London, C=GB". For IoT devices, usually the DeviceIDcertificateValidityInDays- how many days the certificate should be valid for
-
-
Method Detail
-
isClientOnly
public boolean isClientOnly()
-
setClientOnly
public void setClientOnly(boolean clientOnly)
-
getIpAddress
@Deprecated public java.net.InetAddress getIpAddress()
Deprecated.because binding to multiple addresses is supported. UsegetIpAddresses()instead.- Returns:
- the (singular) IP address that will be used for mDNS.
-
getIpAddresses
public java.util.Set<java.net.InetAddress> getIpAddresses()
-
setIpAddress
@Deprecated public void setIpAddress(java.net.InetAddress ipAddress)
Deprecated.because binding to multiple addresses is supported. UsesetIpAddresses(Set)instead.- Parameters:
ipAddress- the IP address to bind this SHIP node to.
-
setIpAddresses
public void setIpAddresses(java.util.Set<java.net.InetAddress> ipAddresses)
-
getPort
public int getPort()
-
setPort
public void setPort(int port)
-
getWssPath
public java.lang.String getWssPath()
-
setWssPath
public void setWssPath(java.lang.String wssPath)
-
isKeepAlive
public boolean isKeepAlive()
-
setKeepAlive
public void setKeepAlive(boolean keepAlive)
-
getServiceId
public java.lang.String getServiceId()
-
setServiceId
public void setServiceId(java.lang.String serviceId)
-
getServiceDomain
public java.lang.String getServiceDomain()
-
setServiceDomain
public void setServiceDomain(java.lang.String serviceDomain)
-
getServiceInstance
public java.lang.String getServiceInstance()
-
setServiceInstance
public void setServiceInstance(java.lang.String serviceInstance)
-
getAlias
public java.lang.String getAlias()
-
setAlias
public void setAlias(java.lang.String alias)
-
getCertPath
public java.lang.String getCertPath()
-
setCertPath
public void setCertPath(java.lang.String certPath)
-
getKeyStorePassphrase
public char[] getKeyStorePassphrase()
-
getKeyPairPassphrase
public char[] getKeyPairPassphrase()
-
getDistinguishedName
public java.lang.String getDistinguishedName()
-
getCertificateValidityInDays
public int getCertificateValidityInDays()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-