Class TraceToAasServiceMain
java.lang.Object
test.de.iip_ecosphere.platform.services.environment.services.TraceToAasServiceMain
Simple program to run TraceToAAS in server environment, e.g., for development. Used as basis for TraceToAasTest!
We do not use (info-)logging in here, because Qpid installs a turbo filter that denies all info messages.
- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA simple data class.private static classAn internal lifecycle descriptor (mocking the platform). -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static TraceToAasServiceMain.MyLifecycleDescriptorprivate static de.iip_ecosphere.platform.support.Serverprivate static booleanprivate static de.iip_ecosphere.platform.support.Serverprivate static de.iip_ecosphere.platform.support.Server -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic de.iip_ecosphere.platform.services.environment.services.TraceToAasServiceCreates a test service instance.static voidA simple main program for tests starting up an AAS, theTraceToAasServicewith two log entries and waiting for CTRL-C.static voidshutdown()Shuts down the test.static voidInitializes the test.
-
Field Details
-
qpid
private static de.iip_ecosphere.platform.support.Server qpid -
aasDesc
-
registryServer
private static de.iip_ecosphere.platform.support.Server registryServer -
aasServer
private static de.iip_ecosphere.platform.support.Server aasServer -
oldWaitForAas
private static boolean oldWaitForAas
-
-
Constructor Details
-
TraceToAasServiceMain
public TraceToAasServiceMain()
-
-
Method Details
-
startup
public static void startup(String host, int aasRegistryPort, int aasServerPort, int aasProtocolPort) Initializes the test.- Parameters:
host- the host name / IP address of the server if the server shall be visible, may be null or empty for default ("localhost")aasRegistryPort- the port of the AAS registry, if-1use ephemeral ports for registry/serveraasServerPort- the port of the AAS registry, if this oraasRegistryPortis-1use ephemeral ports for registry/serveraasProtocolPort- port for the AAS protocol server, may be-1for ephemeral
-
shutdown
public static void shutdown()Shuts down the test. -
createService
public static de.iip_ecosphere.platform.services.environment.services.TraceToAasService createService()Creates a test service instance.- Returns:
- the service instance
-
main
A simple main program for tests starting up an AAS, theTraceToAasServicewith two log entries and waiting for CTRL-C.- Parameters:
args- optional command line arguments, --aasServerPort=<int> determines the port of the AAS server, --aasRegistyPort=<int> the port of the AAS registry server, --aasProtocolPort=<int> the port of the AAS implementation/protocol server for implementing functions, --aasHost=<String> as the host name/IP of the server- Throws:
ExecutionException- if setting service states fails
-