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

org.zodiac.sdk.simplenetty.channel.ChannelConfig Maven / Gradle / Ivy

There is a newer version: 1.6.8
Show newest version
package org.zodiac.sdk.simplenetty.channel;

import java.util.*;

public class ChannelConfig {

    private static Map parentOptions;
    private static Map childOptions;

    static {
        parentOptions = new HashMap<>();
        childOptions = new HashMap<>();
        parentOptions.put(ChannelOption.CORE_SIZE.name, 2);
        childOptions.put(ChannelOption.CORE_SIZE.name, ChannelOption.CORE_SIZE.value);
    }

    public static  T getParentOption(String name, Class tClass) {
        return (T)parentOptions.get(name);
    }

    public static  T getChildOption(String name, Class tClass) {
        return (T)childOptions.get(name);
    }

    public static void addParentOption(ChannelOption option) {
        parentOptions.put(option.name, option.value);
    }

    public static void addChildOption(ChannelOption option) {
        childOptions.put(option.name, option.value);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy