public static class AasPartRegistry.AasSetup extends Object
server and registry shall point to the same server
instance but with different endpoint paths (in memory registry). For a real installation, this information may
differ. Typically, the implementation runs on localhost.| Modifier and Type | Field and Description |
|---|---|
private ProtocolAddressHolder |
implementation |
private AasPartRegistry.AasMode |
mode |
private EndpointHolder |
registry |
private EndpointHolder |
server |
private String |
serverHost |
| Constructor and Description |
|---|
AasSetup()
Default constructor.
|
AasSetup(AasPartRegistry.AasSetup setup)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
de.iip_ecosphere.platform.support.Endpoint |
adaptEndpoint(de.iip_ecosphere.platform.support.Endpoint endpoint)
Potentially adapts the endpoint with respect to
getServerEndpoint(). |
static AasPartRegistry.AasSetup |
createLocalEphemeralSetup()
Returns a default setup with all hosts to
ServerAddress.LOCALHOST and all ports to ephemeral
while the registry port is the same as the aas port. |
static AasPartRegistry.AasSetup |
createLocalEphemeralSetup(AasPartRegistry.AasSetup setup,
boolean regPortSame)
Returns a default setup with all hosts to
ServerAddress.LOCALHOST and all ports to ephemeral. |
static <A extends AasPartRegistry.AasSetup> |
createLocalEphemeralSetup(A setup,
boolean regPortSame,
Supplier<A> supplier)
Returns a default setup with all hosts to
ServerAddress.LOCALHOST and all ports to ephemeral. |
ProtocolAddressHolder |
getImplementation()
Returns the implementation (server) information.
|
String |
getImplementationProtocol()
Returns the implementation protocol.
|
de.iip_ecosphere.platform.support.ServerAddress |
getImplementationServer()
Returns the implementation server information as server address.
|
AasPartRegistry.AasMode |
getMode()
Returns the AAS mode.
|
EndpointHolder |
getRegistry()
Returns the AAS information.
|
de.iip_ecosphere.platform.support.Endpoint |
getRegistryEndpoint()
Returns the registry server information as endpoint.
|
EndpointHolder |
getServer()
Returns the AAS server information.
|
de.iip_ecosphere.platform.support.Endpoint |
getServerEndpoint()
Returns the AAS server information as endpoint.
|
String |
getServerHost()
Returns the server host.
|
void |
setImplementation(ProtocolAddressHolder implementation)
Defines the implementation (server) information.
|
void |
setMode(AasPartRegistry.AasMode mode)
Defines the AAS mode.
|
void |
setRegistry(EndpointHolder registry)
Defines the registry information.
|
void |
setServer(EndpointHolder aas)
Defines the AAS server information.
|
void |
setServerHost(String serverHost)
Changes the server host.
|
private EndpointHolder server
private EndpointHolder registry
private ProtocolAddressHolder implementation
private String serverHost
private AasPartRegistry.AasMode mode
public AasSetup()
public AasSetup(AasPartRegistry.AasSetup setup)
setup - the setup to copy frompublic de.iip_ecosphere.platform.support.Endpoint getServerEndpoint()
public de.iip_ecosphere.platform.support.Endpoint getRegistryEndpoint()
public de.iip_ecosphere.platform.support.ServerAddress getImplementationServer()
public String getImplementationProtocol()
AasFactory)public EndpointHolder getServer()
public void setServer(EndpointHolder aas)
aas - the AAS server informationpublic EndpointHolder getRegistry()
public AasPartRegistry.AasMode getMode()
public void setMode(AasPartRegistry.AasMode mode)
mode - the AAS modepublic String getServerHost()
server or registry is sufficient.
However, if the devices shall use a specific address, while the server shall listen to multiple or all
available IP addresses, the address to be used for server instance creation may have to be different, e.g.,
"localhost" rather than a specific IO.AasPartRegistry.NO_SPECIFIC_SERVER_HOST to indicate that the addresses in
server or registry shall be usedpublic de.iip_ecosphere.platform.support.Endpoint adaptEndpoint(de.iip_ecosphere.platform.support.Endpoint endpoint)
getServerEndpoint().endpoint - the endpoint to be adaptedendpointpublic void setServerHost(String serverHost)
serverHost - the server host, may be AasPartRegistry.NO_SPECIFIC_SERVER_HOST to indicate that the addresses in
server or registry shall be usedgetServerHost()public void setRegistry(EndpointHolder registry)
registry - the registry informationpublic ProtocolAddressHolder getImplementation()
public void setImplementation(ProtocolAddressHolder implementation)
implementation - the implementation (server) informationpublic static AasPartRegistry.AasSetup createLocalEphemeralSetup()
ServerAddress.LOCALHOST and all ports to ephemeral
while the registry port is the same as the aas port.public static AasPartRegistry.AasSetup createLocalEphemeralSetup(AasPartRegistry.AasSetup setup, boolean regPortSame)
ServerAddress.LOCALHOST and all ports to ephemeral.setup - the instance to set up (if null a new one is created)regPortSame - shall the registry port be the same as the AAS portpublic static <A extends AasPartRegistry.AasSetup> A createLocalEphemeralSetup(A setup, boolean regPortSame, Supplier<A> supplier)
ServerAddress.LOCALHOST and all ports to ephemeral.A - the AAS setup typesetup - the instance to set up (if null a new one is created via supplier)regPortSame - shall the registry port be the same as the AAS portsupplier - a supplier for a new instanceCopyright © 2022. All rights reserved.