All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jadex.extension.rs.RSFactory Maven / Gradle / Ivy

Go to download

The Jadex webservice platform extension package contains basic functionality for WSDL web services and REST web services.

The newest version!
package jadex.extension.rs;

import jadex.bridge.IInternalAccess;
import jadex.commons.SReflect;

import java.lang.reflect.InvocationHandler;

/**
 * Factory for instantiating the platform-specific RestServiceWrapperInvocationHandler.
 */
public abstract class RSFactory
{
	private static RSFactory INSTANCE = null;
	
	public static RSFactory getInstance() 
	{
		if(INSTANCE == null) 
		{
			Class clazz = null;
			clazz = SReflect.classForName0("jadex.extension.rs.RSFactoryAndroid", null);
			if(clazz == null) 
			{
				clazz = SReflect.classForName0("jadex.extension.rs.RSFactoryDesktop", null);
			}
			if(clazz != null) 
			{
				try
				{
					INSTANCE = (RSFactory) clazz.newInstance();
				}
				catch (InstantiationException e)
				{
					e.printStackTrace();
				}
				catch (IllegalAccessException e)
				{
					e.printStackTrace();
				}
			}
		}
		return INSTANCE;
	}

	public abstract InvocationHandler createRSWrapperInvocationHandler(IInternalAccess agent, Class impl);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy