Class Test
java.lang.Object
de.iip_ecosphere.platform.services.environment.Starter
de.iip_ecosphere.platform.services.environment.spring.Starter
test.de.iip_ecosphere.platform.simpleStream.spring.Test
- All Implemented Interfaces:
org.springframework.boot.CommandLineRunner
@SpringBootApplication
@EnableScheduling
@ComponentScan({"test.de.iip_ecosphere.platform.simpleStream.spring","de.iip_ecosphere.platform.services.environment.spring","de.iip_ecosphere.platform.transport.spring"})
public class Test
extends de.iip_ecosphere.platform.services.environment.spring.Starter
Defines the test stream to be processed. We assume that a broker is running.
- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested classes/interfaces inherited from class de.iip_ecosphere.platform.services.environment.Starter
de.iip_ecosphere.platform.services.environment.Starter.Plugin -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate de.iip_ecosphere.platform.services.environment.spring.SpringAsyncServiceBaseprivate Configurationprivate static final Stringprivate static final Stringprivate static final Stringprivate de.iip_ecosphere.platform.support.metrics.Counterprivate de.iip_ecosphere.platform.support.metrics.Counterprivate de.iip_ecosphere.platform.support.metrics.Timerprivate static Stringprivate booleanprivate intprivate de.iip_ecosphere.platform.support.metrics.Counterprivate de.iip_ecosphere.platform.support.metrics.Counterprivate de.iip_ecosphere.platform.support.metrics.Timerprivate de.iip_ecosphere.platform.services.environment.spring.metricsProvider.MetricsProviderprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final StringFields inherited from class de.iip_ecosphere.platform.services.environment.spring.Starter
EXTERNAL_BINDER_NAME, OPT_SPRING_BINDER_POSTFIX, OPT_SPRING_BINDINGS_PREFIX, OPT_SPRING_FUNCTION_DEFFields inherited from class de.iip_ecosphere.platform.services.environment.Starter
ARG_AAS_NOTIFICATION, DFLT_LOCAL_TRANSPORT_SETUP_SUPPLIER, IIP_APP_NOAAS, IIP_APP_PREFIX, IIP_TEST, IIP_TEST_PLUGIN, IIP_TEST_PREFIX, PARAM_IIP_APP_ID, PARAM_IIP_APP_PLUGINS, PARAM_IIP_APP_PLUGINS_NO_PLUGINS, PARAM_IIP_ENFORCE_START_SEQUENCE, PARAM_IIP_PORT, PARAM_IIP_PROTOCOL, PARAM_IIP_START_SERVER, PARAM_IIP_START_SERVER_ONLY, PARAM_IIP_TEST_AAS_PORT, PARAM_IIP_TEST_AASREG_PORT, PARAM_IIP_TEST_SERVICE_AUTOSTART, PARAM_IIP_TEST_SM_PORT, PARAM_IIP_TEST_SMREG_PORT, PARAM_IIP_TEST_TRANSPORT_PORT, PARAM_IIP_TRANSPORT_GLOBAL, PROPERTY_JAVA8 -
Constructor Summary
ConstructorsConstructorDescriptionTest(org.springframework.core.env.Environment environment) Creates an instance. -
Method Summary
Modifier and TypeMethodDescriptioncreate()Creates the data.protected List<de.iip_ecosphere.platform.services.environment.Service> createServices(de.iip_ecosphere.platform.services.environment.YamlArtifact artifact) voiddestroy()Called during shutdown.static StringgetAppInstIdSuffix(String separator) Composes a channel suffix id for a service possibly including the application instance id.private voidAsynchronously ingests data.log()Consumes the received data.logAsync()Simplified logging reception for async calls.static voidMain function.voidCalled after constructor.static voidstop()Stops the application.Methods inherited from class de.iip_ecosphere.platform.services.environment.spring.Starter
augmentByAppId, augmentByAppId, createMetricsClient, createMetricsClient, getContext, getEnvironment, initialize, main, mapService, mapService, parseExternConnections, runMethods inherited from class de.iip_ecosphere.platform.services.environment.Starter
addAppEnvironment, addAppEnvironment, autostartService, composeArgument, considerInstalledDependencies, enablesLocalTransport, enforceStartSequence, expectAas, extractProcessArtifacts, findArtifact, getAppId, getApplicationSetupAsStream, getMappedService, getProtocolBuilder, getServiceAutostart, getServiceCommandNetworkMgrKey, getServiceId, getServiceId, getServiceMapper, getServicePort, getServicePortName, getServiceProcessNetworkMgrKey, getSetup, inTest, loadOktoPlugins, mapService, mapService, normalizeServiceId, parse, registerAfterPluginInitializer, registerDefaultPlugins, registerPlugin, runPlugin, setAasNotificationMode, setCmdServerConfigurer, setLocalTransportSetupSupplier, setOnServiceAutostartAttachShutdownHook, setServiceAutostart, shutdown, start, startDataForMappedServices, startServer, transferArgsToEnvironment
-
Field Details
-
SUPPLIER_GAUGE_ID
- See Also:
-
SUPPLIER_COUNTER_ID
- See Also:
-
CONSUMER_GAUGE_ID
- See Also:
-
CONSUMER_COUNTER_ID
- See Also:
-
CONSUMER_RECV_ID
- See Also:
-
REST_GAUGE_ID
- See Also:
-
REST_COUNTER_ID
- See Also:
-
REST_TIMER_ID
- See Also:
-
fileName
-
config
-
ingestCount
private int ingestCount -
metrics
@Autowired private de.iip_ecosphere.platform.services.environment.spring.metricsProvider.MetricsProvider metrics -
first
private boolean first -
logSent
private de.iip_ecosphere.platform.support.metrics.Counter logSent -
logReceived
private de.iip_ecosphere.platform.support.metrics.Counter logReceived -
logTime
private de.iip_ecosphere.platform.support.metrics.Timer logTime -
createSent
private de.iip_ecosphere.platform.support.metrics.Counter createSent -
createReceived
private de.iip_ecosphere.platform.support.metrics.Counter createReceived -
createTime
private de.iip_ecosphere.platform.support.metrics.Timer createTime -
base
private de.iip_ecosphere.platform.services.environment.spring.SpringAsyncServiceBase base -
appInstId
-
-
Constructor Details
-
Test
@Autowired public Test(org.springframework.core.env.Environment environment) Creates an instance.- Parameters:
environment- the Spring environment
-
-
Method Details
-
getAppInstIdSuffix
Composes a channel suffix id for a service possibly including the application instance id.- Parameters:
separator- the separator string to insert between the ids- Returns:
- the id suffix, may be empty
-
create
Creates the data.- Returns:
- the data (generator)
-
stop
public static void stop()Stops the application. -
log
Consumes the received data.- Returns:
- the data receiver
-
logAsync
Simplified logging reception for async calls. Non-spring, no metrics.- Returns:
- the data receiver
-
postConstruct
@PostConstruct public void postConstruct()Called after constructor. -
destroy
@PreDestroy public void destroy()Called during shutdown. -
ingest
Asynchronously ingests data.- Parameters:
data- the data to ingest
-
createServices
protected List<de.iip_ecosphere.platform.services.environment.Service> createServices(de.iip_ecosphere.platform.services.environment.YamlArtifact artifact) - Specified by:
createServicesin classde.iip_ecosphere.platform.services.environment.spring.Starter
-
main
Main function.- Parameters:
args- command line arguments
-