package com.subterranean_security.crimson.server.network;

import com.subterranean_security.crimson.core.Common.Instance;
import com.subterranean_security.crimson.server.ServerStore;
import com.subterranean_security.crimson.server.SyncedProfile;

public class Receptor implements AutoCloseable {

	public ServerHandler handle;
	public ServerExecutor executor = new ServerExecutor(this);

	private int profile;

	public Receptor(ServerHandler handle) {
		this.handle = handle;
	}

	public void close() {

	}

	public SyncedProfile getProfile() {
		try {
			return (SyncedProfile) ServerStore.Databases.system.get(profile);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}

	public Instance getInstance() {
		return Instance.VIEWER;// TODO
	}

	public int getClientid() {
		return getProfile().getClientid();
	}

}
