/************************************************
* Columbia University CS Department
* Systems and Security Group
*
* Open and Survivable Embedded Systems (OASES)
*
* Michael E. Locasto
*
* Protocol For Code Exchange
*  in Survivable Embedded Systems (PCXSES)
*
* This software is provided as is without any
* warranty or guarantee of merchantibility
* or fitness for a particular purpose. This
* software is released under the terms of the
* GNU General Public License (GPL).
*
* Last updated: December 4, 2002
*
***********************************************/


package locasto.pcxses.client;

import locasto.pcxses.protocol.*;

/**
 * Static singleton factory for PCXClient
 * instances.
 *
 *
 *
 * @author locasto@cs.columbia.edu
*/
public final class PCXClientFactory{

	/** factory instance */
	private static PCXClientFactory _factory = null;

	/** private constructor */
	private PCXClientFactory(){
	}


	/** create the factory */
	public static PCXClientFactory getInstance(){
		if( null==_factory )
			_factory = new PCXClientFactory();
		return _factory;
	}


	/**
	 * Use the factory to produce a new
	 * PCXClient, passing it our ClassLoader.
	 *
	 *
	*/
	public PCXClient createPCXClient(){
		return ((PCXClient) new DefaultPCXClient_Impl( this.getClass().getClassLoader() ));
	}



}
