public ConnectionProcessorImpl(final InputStream localIn,
                                   final OutputStream localOut,
                                   final InputStream remoteIn,
                                   final OutputStream remoteOut,
                                   final String route_name,
                                   final File log_dir,
                                   final Properties[] filterConfigs) throws IOException {
        this.id = nextId();
        final FilterFactory filterFactory = new FilterFactory(filterConfigs);
		    logger = route_name != null && log_dir != null ? new ConnectionLoggerImpl(log_dir, route_name, this.id) : new ConsoleConnectionLogger(route_name, this.id);
        this.remote_to_local_pipe = new ConnectionProcessorPipe(localIn,  filterFactory.getInstances(this), remoteOut, logger, null); // null buffer sisze => default
        this.local_to_remote_pipe = new ConnectionProcessorPipe(remoteIn, filterFactory.getInstances(this), localOut,  logger, null); // null buffer sisze => default
        pipes = new ConnectionProcessorPipe[] {
                remote_to_local_pipe,
                local_to_remote_pipe,
        };
        threads = new Thread[pipes.length];
        start_logging();
    }