Package org.swisspush.gateleen.runconfig
Class RunConfig
- java.lang.Object
-
- org.swisspush.gateleen.runconfig.RunConfig
-
public class RunConfig extends java.lang.ObjectHelper class to configure verticles.- Author:
- https://github.com/mcweba [Marc-Andre Weber]
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRunConfig.RunConfigBuilderRunConfigBuilder class for simplyfied configuration of the run configuration.
-
Field Summary
Fields Modifier and Type Field Description static longEVENTBUS_BRIDGE_PING_INTERVALstatic java.lang.String[]PROFILE_PROPERTIES_PROVIDED_BY_THE_CLIENTstatic java.lang.String[]PROFILE_PROPERTIES_PROVIDED_BY_THE_PROXYstatic java.lang.StringROLE_PATTERNstatic java.lang.StringROOTstatic java.lang.StringSERVER_ARRIVAL_TIMESTAMP_HEADERstatic java.lang.StringSERVER_NAMEstatic java.lang.StringSERVER_ROOTstatic java.lang.StringSERVER_TIMESTAMP_HEADER
-
Constructor Summary
Constructors Constructor Description RunConfig(io.vertx.core.Vertx vertx, io.vertx.redis.RedisClient redisClient, java.lang.Class verticleClass, org.swisspush.gateleen.routing.Router router, org.swisspush.gateleen.monitoring.MonitoringHandler monitoringHandler, org.swisspush.gateleen.queue.queuing.QueueBrowser queueBrowser, org.swisspush.gateleen.core.cors.CORSHandler corsHandler, org.swisspush.gateleen.scheduler.SchedulerResourceManager schedulerResourceManager, org.swisspush.gateleen.validation.ValidationResourceManager validationResourceManager, org.swisspush.gateleen.logging.LoggingResourceManager loggingResourceManager, org.swisspush.gateleen.core.configuration.ConfigurationResourceManager configurationResourceManager, org.swisspush.gateleen.queue.queuing.circuitbreaker.configuration.QueueCircuitBreakerConfigurationResourceManager queueCircuitBreakerConfigurationResourceManager, org.swisspush.gateleen.core.event.EventBusHandler eventBusHandler, org.swisspush.gateleen.validation.ValidationHandler validationHandler, org.swisspush.gateleen.hook.HookHandler hookHandler, org.swisspush.gateleen.user.UserProfileHandler userProfileHandler, org.swisspush.gateleen.user.RoleProfileHandler roleProfileHandler, org.swisspush.gateleen.expansion.ExpansionHandler expansionHandler, org.swisspush.gateleen.delta.DeltaHandler deltaHandler, org.swisspush.gateleen.security.authorization.Authorizer authorizer, org.swisspush.gateleen.core.resource.CopyResourceHandler copyResourceHandler, org.swisspush.gateleen.qos.QoSHandler qosHandler, org.swisspush.gateleen.core.property.PropertyHandler propertyHandler, org.swisspush.gateleen.expansion.ZipExtractHandler zipExtractHandler, org.swisspush.gateleen.delegate.DelegateHandler delegateHandler, org.swisspush.gateleen.merge.MergeHandler mergeHandler, org.swisspush.gateleen.kafka.KafkaHandler kafkaHandler, org.swisspush.gateleen.routing.CustomHttpResponseHandler customHttpResponseHandler, org.swisspush.gateleen.security.content.ContentTypeConstraintHandler contentTypeConstraintHandler)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static io.vertx.core.json.JsonObjectbuildMetricsConfig()Builds a standard metrics configuration.static io.vertx.core.json.JsonObjectbuildModRedisConfig(java.lang.String redisHost, int redisPort)Builds a standard mod redis configuration.static java.util.Map<java.lang.String,java.lang.Object>buildRedisProps(java.lang.String redisHost, int redisPort)Builds redis properties configuration.static io.vertx.core.json.JsonObjectbuildRedisquesConfig()Builds a standard redisques configuration.io.vertx.core.Handler<io.vertx.ext.web.RoutingContext>buildRoutingContextHandler()Builds a handler forRoutingContexts with a "default" behaviour.static io.vertx.core.json.JsonObjectbuildStorageConfig()Builds a standard storage configuration.static org.swisspush.gateleen.user.UserProfileConfigurationbuildUserProfileConfiguration()Builds a standard UserProfileConfiguration.static voiddeployModules(io.vertx.core.Vertx vertx, java.lang.Class verticleClass, java.util.Map<java.lang.String,java.lang.Object> props, io.vertx.core.Handler<java.lang.Boolean> handler)Deploys the following modules in this order: org.swisspush.redisques.RedisQues org.swisspush.reststorage.RestStorageMod org.swisspush.metrics.MetricsModulestatic java.util.Map<java.lang.String,java.lang.Object>subMap(java.util.Map<java.lang.String,java.lang.Object> map, java.lang.String prefix)static RunConfig.RunConfigBuilderwith()
-
-
-
Field Detail
-
SERVER_TIMESTAMP_HEADER
public static final java.lang.String SERVER_TIMESTAMP_HEADER
- See Also:
- Constant Field Values
-
SERVER_ARRIVAL_TIMESTAMP_HEADER
public static final java.lang.String SERVER_ARRIVAL_TIMESTAMP_HEADER
- See Also:
- Constant Field Values
-
EVENTBUS_BRIDGE_PING_INTERVAL
public static final long EVENTBUS_BRIDGE_PING_INTERVAL
- See Also:
- Constant Field Values
-
ROOT
public static final java.lang.String ROOT
- See Also:
- Constant Field Values
-
SERVER_NAME
public static final java.lang.String SERVER_NAME
- See Also:
- Constant Field Values
-
SERVER_ROOT
public static final java.lang.String SERVER_ROOT
- See Also:
- Constant Field Values
-
ROLE_PATTERN
public static final java.lang.String ROLE_PATTERN
- See Also:
- Constant Field Values
-
PROFILE_PROPERTIES_PROVIDED_BY_THE_PROXY
public static final java.lang.String[] PROFILE_PROPERTIES_PROVIDED_BY_THE_PROXY
-
PROFILE_PROPERTIES_PROVIDED_BY_THE_CLIENT
public static final java.lang.String[] PROFILE_PROPERTIES_PROVIDED_BY_THE_CLIENT
-
-
Constructor Detail
-
RunConfig
public RunConfig(io.vertx.core.Vertx vertx, io.vertx.redis.RedisClient redisClient, java.lang.Class verticleClass, org.swisspush.gateleen.routing.Router router, org.swisspush.gateleen.monitoring.MonitoringHandler monitoringHandler, org.swisspush.gateleen.queue.queuing.QueueBrowser queueBrowser, org.swisspush.gateleen.core.cors.CORSHandler corsHandler, org.swisspush.gateleen.scheduler.SchedulerResourceManager schedulerResourceManager, org.swisspush.gateleen.validation.ValidationResourceManager validationResourceManager, org.swisspush.gateleen.logging.LoggingResourceManager loggingResourceManager, org.swisspush.gateleen.core.configuration.ConfigurationResourceManager configurationResourceManager, org.swisspush.gateleen.queue.queuing.circuitbreaker.configuration.QueueCircuitBreakerConfigurationResourceManager queueCircuitBreakerConfigurationResourceManager, org.swisspush.gateleen.core.event.EventBusHandler eventBusHandler, org.swisspush.gateleen.validation.ValidationHandler validationHandler, org.swisspush.gateleen.hook.HookHandler hookHandler, org.swisspush.gateleen.user.UserProfileHandler userProfileHandler, org.swisspush.gateleen.user.RoleProfileHandler roleProfileHandler, org.swisspush.gateleen.expansion.ExpansionHandler expansionHandler, org.swisspush.gateleen.delta.DeltaHandler deltaHandler, org.swisspush.gateleen.security.authorization.Authorizer authorizer, org.swisspush.gateleen.core.resource.CopyResourceHandler copyResourceHandler, org.swisspush.gateleen.qos.QoSHandler qosHandler, org.swisspush.gateleen.core.property.PropertyHandler propertyHandler, org.swisspush.gateleen.expansion.ZipExtractHandler zipExtractHandler, org.swisspush.gateleen.delegate.DelegateHandler delegateHandler, org.swisspush.gateleen.merge.MergeHandler mergeHandler, org.swisspush.gateleen.kafka.KafkaHandler kafkaHandler, org.swisspush.gateleen.routing.CustomHttpResponseHandler customHttpResponseHandler, org.swisspush.gateleen.security.content.ContentTypeConstraintHandler contentTypeConstraintHandler)
-
-
Method Detail
-
with
public static RunConfig.RunConfigBuilder with()
-
buildRedisProps
public static java.util.Map<java.lang.String,java.lang.Object> buildRedisProps(java.lang.String redisHost, int redisPort)Builds redis properties configuration.
-
buildModRedisConfig
public static io.vertx.core.json.JsonObject buildModRedisConfig(java.lang.String redisHost, int redisPort)Builds a standard mod redis configuration.
-
buildMetricsConfig
public static io.vertx.core.json.JsonObject buildMetricsConfig()
Builds a standard metrics configuration.
-
buildRedisquesConfig
public static io.vertx.core.json.JsonObject buildRedisquesConfig()
Builds a standard redisques configuration.
-
buildStorageConfig
public static io.vertx.core.json.JsonObject buildStorageConfig()
Builds a standard storage configuration.
-
buildUserProfileConfiguration
public static org.swisspush.gateleen.user.UserProfileConfiguration buildUserProfileConfiguration()
Builds a standard UserProfileConfiguration.
-
deployModules
public static void deployModules(io.vertx.core.Vertx vertx, java.lang.Class verticleClass, java.util.Map<java.lang.String,java.lang.Object> props, io.vertx.core.Handler<java.lang.Boolean> handler)Deploys the following modules in this order:- org.swisspush.redisques.RedisQues
- org.swisspush.reststorage.RestStorageMod
- org.swisspush.metrics.MetricsModule
The handler is called with Boolean.TRUE when all modules have been deployed successfully. When any of the modules could not be deployed correctly, the handler returns Boolean.FALSE.
- Parameters:
vertx-verticleClass-props-handler-
-
buildRoutingContextHandler
public io.vertx.core.Handler<io.vertx.ext.web.RoutingContext> buildRoutingContextHandler()
Builds a handler forRoutingContexts with a "default" behaviour.
-
subMap
public static java.util.Map<java.lang.String,java.lang.Object> subMap(java.util.Map<java.lang.String,java.lang.Object> map, java.lang.String prefix)
-
-