/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.xmr.net.messages;

import java.util.HashMap;
import java.util.Map;


/**
 *
 * @author Adil
 * Handle class for messages
 */
public class Handle {
    private Map<String, Handle> messages;
    public Handle() {
		this.messages = new HashMap<String, Handle>();
	}
    public boolean hasPacket(String id) {
		return this.messages.containsKey(id);
	}
    	public Handle getPacket(String id) {
		if (this.messages.containsKey(id)) {
			return this.messages.get(id);
		}
		else {
			return null;
		}
	}
	
	public void register() {
		
		//Handshake;
		this.messages.put("VERSIONCHECK", new VERSIONCHECK());
	}
}
}

