package com.cisdi.data.HJ212.gateway;

import java.util.UUID;

import com.cisdi.data.sdk.gateway.netty.IoSession;
import com.cisdi.data.sdk.gateway.netty.impl.AbstractSessionFactory;

public class Hj212SessionFactory extends AbstractSessionFactory {
	private String deviceId;

	public Hj212SessionFactory(String deviceId) {
		this.deviceId = deviceId;
	}

	@Override
	public IoSession newSession() {
		IoSession session = new Hj212IoSession(deviceId);
		session.init(UUID.randomUUID().toString(), provider, socketGateway);
		sessionSet.add(session);
		return session;
	}
}
