@Override
    protected LinkedHashMap<String, Callable<? extends ChannelHandler>> getChildChannelHandlers(MessageInput input) {
        final LinkedHashMap<String, Callable<? extends ChannelHandler>> handlers = new LinkedHashMap<>();
        final CodecAggregator aggregator = getAggregator();

        handlers.put("channel-registration", () -> new ChannelRegistrationHandler(childChannels));
        handlers.put("traffic-counter", () -> throughputCounter);
        handlers.put("connection-counter", () -> connectionCounter);
        if (tlsEnable) {
            LOG.info("Enabled TLS for input {}. key-file=\"{}\" cert-file=\"{}\"", input.toIdentifier(), tlsKeyFile, tlsCertFile);
            handlers.put("tls", getSslHandlerCallable(input));
        }
        handlers.putAll(getCustomChildChannelHandlers(input));
        if (aggregator != null) {
            LOG.debug("Adding codec aggregator {} to channel pipeline", aggregator);
            handlers.put("codec-aggregator", () -> new ByteBufMessageAggregationHandler(aggregator, localRegistry));
        }
        handlers.put("rawmessage-handler", () -> new RawMessageHandler(input));
        handlers.put("exception-logger", () -> new ExceptionLoggingChannelHandler(input, LOG, this.tcpKeepalive));

        return handlers;
    }
@Test
    public void getChildChannelHandlersFailsIfTempDirDoesNotExist() throws IOException {
        final File tmpDir = temporaryFolder.newFolder();
        assumeTrue(tmpDir.delete());
        System.setProperty("java.io.tmpdir", tmpDir.getAbsolutePath());

        final Configuration configuration = new Configuration(ImmutableMap.of(
            "bind_address", "localhost",
            "port", 12345,
            "tls_enable", true)
        );

        final AbstractTcpTransport transport = new AbstractTcpTransport(
            configuration, throughputCounter, localRegistry, eventLoopGroup, eventLoopGroupFactory, nettyTransportConfiguration, tlsConfiguration) {};

        expectedException.expect(IllegalStateException.class);
        expectedException.expectMessage("Couldn't write to temporary directory: " + tmpDir.getAbsolutePath());

        transport.getChildChannelHandlers(input);
    }