Example usage for io.netty.handler.codec.string LineSeparator WINDOWS

List of usage examples for io.netty.handler.codec.string LineSeparator WINDOWS

Introduction

In this page you can find the example usage for io.netty.handler.codec.string LineSeparator WINDOWS.

Prototype

LineSeparator WINDOWS

To view the source code for io.netty.handler.codec.string LineSeparator WINDOWS.

Click Source Link

Document

The Windows line separator(CRLF)

Usage

From source file:diskCacheV111.doors.NettyLineBasedDoor.java

License:Open Source License

public NettyLineBasedDoor(String cellName, Args args, NettyLineBasedInterpreterFactory factory,
        ExecutorService executor, PoolManagerHandler poolManagerHandler,
        IdentityResolverFactory idResolverFactory,
        LoadingCache<GetSpaceTokensKey, long[]> spaceDescriptionCache,
        LoadingCache<String, Optional<Space>> spaceLookupCache) {
    super(cellName, args, executor);

    this.factory = factory;
    this.executor = executor;
    this.commandExecutor = new SequentialExecutor(executor);
    this.poolManager = poolManagerHandler;

    this.charset = Charset.forName(args.getOption("charset", "UTF-8"));
    String lineSeparator = args.getOption("lineSeparator", "WINDOWS");
    switch (lineSeparator) {
    case "WINDOWS":
        this.lineSeparator = LineSeparator.WINDOWS;
        break;/*from   www . j  a v a 2s  .  c  o m*/
    case "UNIX":
        this.lineSeparator = LineSeparator.UNIX;
        break;
    default:
        throw new IllegalArgumentException("Invalid line separator value: " + lineSeparator);
    }

    this.expectProxyProtocol = args.getBooleanOption("expectProxyProtocol");
    this.idResolverFactory = idResolverFactory;
    this.spaceDescriptionCache = spaceDescriptionCache;
    this.spaceLookupCache = spaceLookupCache;
}