// Path: monica-registry/src/main/java/monica/registry/context/RegistryContext.java
// public class RegistryContext {
// 	// caheKey: curatorClient providers server usefulProviders
// 	public static ConcurrentHashMap<String, Object> clientCache = new ConcurrentHashMap<String, Object>();
// }


import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.socket.SocketChannel;
import io.netty.handler.codec.serialization.ClassResolvers;
import io.netty.handler.codec.serialization.ObjectDecoder;
import io.netty.handler.codec.serialization.ObjectEncoder;
import io.netty.handler.ssl.SslContext;
import monica.registry.context.RegistryContext;

package monica.files.socket;


/**
 * 
 * @author lucy@polarcoral.com
 *
 *         2017-08-29
 */
public class FileClientInitializer extends ChannelInitializer<SocketChannel> {
	private final String SERVER_IP_CACHE = "server_ip";
	private final String SERVER_PORT_CACHE = "server_port";

// Path: monica-registry/src/main/java/monica/registry/context/RegistryContext.java
// public class RegistryContext {
// 	// caheKey: curatorClient providers server usefulProviders
// 	public static ConcurrentHashMap<String, Object> clientCache = new ConcurrentHashMap<String, Object>();
// }


// Path: monica-files/monica-files-socket/src/main/java/monica/files/socket/FileClientInitializer.java
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.socket.SocketChannel;
import io.netty.handler.codec.serialization.ClassResolvers;
import io.netty.handler.codec.serialization.ObjectDecoder;
import io.netty.handler.codec.serialization.ObjectEncoder;
import io.netty.handler.ssl.SslContext;
import monica.registry.context.RegistryContext;

package monica.files.socket;


/**
 * 
 * @author lucy@polarcoral.com
 *
 *         2017-08-29
 */
public class FileClientInitializer extends ChannelInitializer<SocketChannel> {
	private final String SERVER_IP_CACHE = "server_ip";
	private final String SERVER_PORT_CACHE = "server_port";

	private String ip = (String) RegistryContext.clientCache.get(SERVER_IP_CACHE);
