package com.cisdi.data.emserver.gateway.impl;

import java.util.UUID;

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

public class EmiaProSessionFactory extends AbstractSessionFactory {
	
	private String onlyOneDeviceId;

	public EmiaProSessionFactory(String onlyoneDeviceId) {
		this.onlyOneDeviceId = onlyoneDeviceId;
	}

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