Package org.jboss.aerogear.simplepush.server.DefaultSimplePushConfig

Examples of org.jboss.aerogear.simplepush.server.DefaultSimplePushConfig.Builder


    protected void performRuntime(final OperationContext context,
            final ModelNode operation,
            final ModelNode model,
            final ServiceVerificationHandler verificationHandler,
            final List<ServiceController<?>> newControllers) throws OperationFailedException {
        final Builder simplePushConfig = parseSimplePushOptions(context, model);
        final SockJsConfig sockJsConfig = parseSockJsOptions(context, model);
        final SimplePushService simplePushService = new SimplePushService(simplePushConfig, sockJsConfig);

        final String serverName = PathAddress.pathAddress(operation.get(ModelDescriptionConstants.ADDRESS)).getLastElement().getValue();
        final ServiceName serviceName = SimplePushService.createServiceName(serverName);
View Full Code Here


        final ModelNode reaperTimeout = ServerDefinition.REAPER_TIMEOUT_ATTR.resolveModelAttribute(context, model);
        final ModelNode notificationPrefix = ServerDefinition.ENDPOINT_PREFIX_ATTR.resolveModelAttribute(context, model);
        final ModelNode notificationtTls = ServerDefinition.ENDPOINT_TLS_ATTR.resolveModelAttribute(context, model);
        final ModelNode notificationAckInterval = ServerDefinition.ENDPOINT_ACK_INTERVAL_ATTR.resolveModelAttribute(context, model);

        final Builder simplePushConfig = DefaultSimplePushConfig.create();
        simplePushConfig.password(ServerDefinition.PASSWORD_ATTR.resolveModelAttribute(context, model).asString());
        if (notificationtTls.isDefined()) {
            simplePushConfig.endpointTls(notificationtTls.asBoolean());
        }
        if (reaperTimeout.isDefined()) {
            simplePushConfig.userAgentReaperTimeout(reaperTimeout.asLong());
        }
        if (notificationPrefix.isDefined()) {
            simplePushConfig.endpointPrefix(notificationPrefix.asString());
        }
        if (notificationAckInterval.isDefined()) {
            simplePushConfig.ackInterval(notificationAckInterval.asLong());
        }
        return simplePushConfig;
    }
View Full Code Here

    protected void performRuntime(final OperationContext context,
            final ModelNode operation,
            final ModelNode model,
            final ServiceVerificationHandler verificationHandler,
            final List<ServiceController<?>> newControllers) throws OperationFailedException {
        final Builder simplePushConfig = parseSimplePushOptions(context, model);
        final SockJsConfig sockJsConfig = parseSockJsOptions(context, model);
        final SimplePushService simplePushService = new SimplePushService(simplePushConfig, sockJsConfig);

        final String serverName = PathAddress.pathAddress(operation.get(ModelDescriptionConstants.ADDRESS)).getLastElement().getValue();
        final ServiceName serviceName = SimplePushService.createServiceName(serverName);
View Full Code Here

        final ModelNode notificationPrefix = ServerDefinition.ENDPOINT_PREFIX_ATTR.resolveModelAttribute(context, model);
        final ModelNode notificationtTls = ServerDefinition.ENDPOINT_TLS_ATTR.resolveModelAttribute(context, model);
        final ModelNode notificationAckInterval = ServerDefinition.ENDPOINT_ACK_INTERVAL_ATTR.resolveModelAttribute(context, model);
        final ModelNode notifierMaxThreads = ServerDefinition.NOTIFIER_MAX_THREADS.resolveModelAttribute(context, model);

        final Builder simplePushConfig = DefaultSimplePushConfig.create();
        simplePushConfig.password(ServerDefinition.PASSWORD_ATTR.resolveModelAttribute(context, model).asString());
        if (notificationtTls.isDefined()) {
            simplePushConfig.endpointTls(notificationtTls.asBoolean());
        }
        if (reaperTimeout.isDefined()) {
            simplePushConfig.userAgentReaperTimeout(reaperTimeout.asLong());
        }
        if (notificationPrefix.isDefined()) {
            simplePushConfig.endpointPrefix(notificationPrefix.asString());
        }
        if (notificationAckInterval.isDefined()) {
            simplePushConfig.ackInterval(notificationAckInterval.asLong());
        }
        if (notifierMaxThreads.isDefined()) {
            simplePushConfig.notifierMaxThreads(notifierMaxThreads.asInt());
        }
        return simplePushConfig;
    }
View Full Code Here

    }

    private static SimplePushServerConfig parseSimplePushProperties(final JsonNode json) {
        final JsonNode host = json.get("host");
        final JsonNode port = json.get("port");
        final Builder builder = DefaultSimplePushConfig.create(host.asText(), port.asInt());
        final JsonNode password = json.get("password");
        if (password != null) {
            builder.password(password.asText());
        }
        final JsonNode useragentReaperTimeout = json.get("useragent-reaper-timeout");
        if (useragentReaperTimeout != null) {
            builder.userAgentReaperTimeout(useragentReaperTimeout.asLong());
        }
        final JsonNode endpointHost = json.get("endpoint-host");
        if (endpointHost != null) {
            builder.endpointHost(endpointHost.asText());
        }
        final JsonNode endpointPort = json.get("endpoint-port");
        if (endpointPort != null) {
            builder.endpointPort(endpointPort.asInt());
        }
        final JsonNode endpointTls = json.get("endpoint-tls");
        if (endpointTls != null) {
            builder.endpointTls(endpointTls.asBoolean());
        }
        final JsonNode endpointPrefix = json.get("endpoint-prefix");
        if (endpointPrefix != null) {
            builder.endpointPrefix(endpointPrefix.asText());
        }
        final JsonNode ackInterval = json.get("ack-interval");
        if (ackInterval != null) {
            builder.ackInterval(ackInterval.asLong());
        }
        final JsonNode notifierMaxThreads = json.get("notifier-max-threads");
        if (notifierMaxThreads != null) {
            builder.notifierMaxThreads(notifierMaxThreads.asInt());
        }
        return builder.build();
    }
View Full Code Here

TOP

Related Classes of org.jboss.aerogear.simplepush.server.DefaultSimplePushConfig.Builder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.