package com.cisdi.data.AMETEKSurfaceVision.gateway;

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

/**
 * 表检仪协议会话工厂
 *
 * @author tzz
 */
public class SurfaceVisionSessionFactory extends AbstractSessionFactory {
    private String deviceId;

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

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