view plugin/icedtea/sun/applet/AppletSecurityContextManager.java @ 1049:abdb5c94757d

More refactoring. Moved classes to a shorter path, removed classes provided by the JDK tarball (they were there by mistake).
author Deepak Bhole <dbhole@redhat.com>
date Tue, 23 Sep 2008 16:52:24 -0400
parents
children 358cb21c4730
line wrap: on
line source

package sun.applet;

import java.util.HashMap;

public class AppletSecurityContextManager {

	// Context identifier -> PluginAppletSecurityContext object.
	// FIXME: make private
	private static HashMap<Integer, AppletSecurityContext> contexts = new HashMap();
	
	public static void addContext(int identifier, AppletSecurityContext context) {
		contexts.put(identifier, context);
	}
	
	public static AppletSecurityContext getSecurityContext(int identifier) {
		return contexts.get(identifier);
	}

	public static void dumpStore(int identifier) {
		contexts.get(identifier).dumpStore();
	}
	
	public static void handleMessage(int identifier, String src, int reference,	String message) {
		System.err.println(identifier + " -- " + src + " -- " + reference + " -- " + message + " CONTEXT= " + contexts.get(identifier));
		contexts.get(identifier).handleMessage(src, reference, message);
	}
}