package org.kne.cloud.network.klalb;

import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;

import javax.net.SocketFactory;

public class KLALBVirtualSocketFactory extends SocketFactory {
private KLALBController controller;
	
	public KLALBVirtualSocketFactory(KLALBController controller) {
		super();
		this.controller = controller;
	}
	@Override
	public Socket createSocket() throws IOException {
		return new KLALBVirtualSocket(controller);
	}
	@Override
	public Socket createSocket(String arg0, int arg1) throws IOException, UnknownHostException {
	
		return new KLALBVirtualSocket(controller, arg0, arg1);
	}

	@Override
	public Socket createSocket(InetAddress arg0, int arg1) throws IOException {
		return new KLALBVirtualSocket(controller, arg0, arg1);
	}

	@Override
	public Socket createSocket(String arg0, int arg1, InetAddress arg2, int arg3)
			throws IOException, UnknownHostException {
		return new KLALBVirtualSocket(controller, arg0, arg1, arg2, arg3);
	}

	@Override
	public Socket createSocket(InetAddress arg0, int arg1, InetAddress arg2, int arg3) throws IOException {
		return new KLALBVirtualSocket(controller, arg0, arg1, arg2, arg3);
	}

}
