All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.rxmicro.common.Constants Maven / Gradle / Ivy

There is a newer version: 0.11
Show newest version
/*
 * Copyright (c) 2020. https://rxmicro.io
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package io.rxmicro.common;

/**
 * The common constants for the RxMicro framework.
 *
 * @author nedis
 * @since 0.1
 */
@SuppressWarnings("JavaDoc")
public final class Constants {

    /**
     * The RxMicro framework name: {@value #RX_MICRO_FRAMEWORK_NAME}.
     */
    public static final String RX_MICRO_FRAMEWORK_NAME = "RxMicro";

    /**
     * Nanos in 1 millis.
     */
    public static final int NANOS_IN_1_MILLIS = 1_000_000;

    /**
     * Nanos in 1 second.
     */
    public static final int NANOS_IN_1_SECOND = 1_000_000_000;

    private Constants() {
    }

    /**
     * This class describes the constants for virtual descriptor.
     *
     * 

* The RxMicro framework supports the {@code unnamed module} mode for interaction * with external frameworks and libs that don't support {@code JPMS}. * *

* But some RxMicro modules require the common configuration with RxMicro Annotations, * which annotate the {@code module-info.java} module descriptor. * But for the {@code unnamed module}, the {@code module-info.java} module descriptor does not exist! * *

* In such cases a virtual descriptor must be used. * * @author nedis * @since 0.2 */ public static final class VirtualModuleInfoConstants { /** * The virtual descriptor annotation name: {@value #RX_MICRO_VIRTUAL_MODULE_INFO_ANNOTATION_NAME}. */ public static final String RX_MICRO_VIRTUAL_MODULE_INFO_ANNOTATION_NAME = "ModuleInfo"; /** * The static final field that describes the module name for the virtual descriptor: {@value #RX_MICRO_FRAMEWORK_NAME}. */ public static final String RX_MICRO_VIRTUAL_MODULE_INFO_NAME = "NAME"; /** * The default module name for the virtual descriptor: {@value #RX_MICRO_VIRTUAL_MODULE_INFO_DEFAULT_NAME}. */ public static final String RX_MICRO_VIRTUAL_MODULE_INFO_DEFAULT_NAME = "virtual.module"; private VirtualModuleInfoConstants() { } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy