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

jadex.bridge.nonfunctional.SNFPropertyProvider Maven / Gradle / Ivy

Go to download

Jadex bridge is a base package for kernels and platforms, i.e., it is used by both and provides commonly used interfaces and classes for active components and their management.

There is a newer version: 4.0.267
Show newest version
package jadex.bridge.nonfunctional;

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

import jadex.bridge.IExternalAccess;
import jadex.bridge.IInternalAccess;
import jadex.bridge.ImmediateComponentStep;
import jadex.bridge.component.INFPropertyComponentFeature;
import jadex.bridge.service.IServiceIdentifier;
import jadex.commons.MethodInfo;
import jadex.commons.SUtil;
import jadex.commons.future.DelegationResultListener;
import jadex.commons.future.ExceptionDelegationResultListener;
import jadex.commons.future.Future;
import jadex.commons.future.IFuture;
import jadex.commons.transformation.annotations.Classname;

/**
 *  Static helper class for accessing nf properties also remotely.
 */
public class SNFPropertyProvider
{
	/**
	 *  Returns the declared names of all non-functional properties of this service.
	 *  @return The names of the non-functional properties of this service.
	 */
	public static IFuture getNFPropertyNames(IExternalAccess component)
	{
		return component.scheduleStep(new ImmediateComponentStep()
		{
			@Classname("getNFPropertyNames0")
			public IFuture execute(IInternalAccess ia)
			{
				INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
				return nfp.getComponentPropertyProvider().getNFPropertyNames();
			}
		});
	}
	
	/**
	 *  Returns the names of all non-functional properties of this service.
	 *  @return The names of the non-functional properties of this service.
	 */
	public static IFuture getNFAllPropertyNames(IExternalAccess component)
	{
		return component.scheduleStep(new ImmediateComponentStep()
		{
			@Classname("getNFAllPropertyName1")
			public IFuture execute(IInternalAccess ia)
			{
				INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
				return nfp==null? new Future(SUtil.EMPTY_STRING_ARRAY): nfp.getComponentPropertyProvider().getNFAllPropertyNames();
			}
		});
	}
	
	/**
	 *  Returns the meta information about a non-functional property of this service.
	 *  @param name Name of the property.
	 *  @return The meta information about a non-functional property of this service.
	 */
	public static IFuture> getNFPropertyMetaInfos(IExternalAccess component)
	{
		return component.scheduleStep(new ImmediateComponentStep>()
		{
			@Classname("getNFPropertyMetaInfos2")
			public IFuture> execute(IInternalAccess ia)
			{
				INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
				return nfp==null? new Future>((Map)null) :nfp.getComponentPropertyProvider().getNFPropertyMetaInfos();
			}
		});
	}
	
	/**
	 *  Returns the meta information about a non-functional property of this service.
	 *  @param name Name of the property.
	 *  @return The meta information about a non-functional property of this service.
	 */
	public static IFuture getNFPropertyMetaInfo(IExternalAccess component, final String name)
	{
		return component.scheduleStep(new ImmediateComponentStep()
		{
			@Classname("getNFPropertyMetaInfo3")
			public IFuture execute(IInternalAccess ia)
			{
				INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
				return nfp.getComponentPropertyProvider().getNFPropertyMetaInfo(name);
			}
		});
	}
	
	/**
	 *  Returns the current value of a non-functional property of this service.
	 *  @param name Name of the property.
	 *  @param type Type of the property value.
	 *  @return The current value of a non-functional property of this service.
	 */
	public static  IFuture getNFPropertyValue(IExternalAccess component, final String name)
	{
		return component.scheduleStep(new ImmediateComponentStep()
		{
			@Classname("getNFPropertyValue4")
			public IFuture execute(IInternalAccess ia)
			{
				INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
				return nfp.getComponentPropertyProvider().getNFPropertyValue(name);
			}
		});
	}
	
	/**
	 *  Returns the current value of a non-functional property of this service, performs unit conversion.
	 *  @param name Name of the property.
	 *  @param type Type of the property value.
	 *  @param unit Unit of the property value.
	 *  @return The current value of a non-functional property of this service.
	 */
//	public  IFuture getNFPropertyValue(String name, Class unit);
	public static  IFuture getNFPropertyValue(IExternalAccess component, final String name, final U unit)
	{
		return component.scheduleStep(new ImmediateComponentStep()
		{
			@Classname("getNFPropertyValue5")
			public IFuture execute(IInternalAccess ia)
			{
				INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
				return nfp.getComponentPropertyProvider().getNFPropertyValue(name, unit);
			}
		});
	}
	
	/**
	 *  Add a non-functional property.
	 *  @param nfprop The property.
	 */
	public static IFuture addNFProperty(IExternalAccess component, final INFProperty nfprop)
	{
		return component.scheduleStep(new ImmediateComponentStep()
		{
			@Classname("addNFProperty6")
			public IFuture execute(IInternalAccess ia)
			{
				INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
				return nfp.getComponentPropertyProvider().addNFProperty(nfprop);
			}
		});
	}
	
	/**
	 *  Remove a non-functional property.
	 *  @param The name.
	 */
	public static IFuture removeNFProperty(IExternalAccess component, final String name)
	{
		return component.scheduleStep(new ImmediateComponentStep()
		{
			@Classname("removeNFProperty7")
			public IFuture execute(IInternalAccess ia)
			{
				INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
				return nfp.getComponentPropertyProvider().removeNFProperty(name);
			}
		});
	}
	
	/**
	 *  Shutdown the provider.
	 */
	public static IFuture shutdownNFPropertyProvider(IExternalAccess component)
	{
		return component.scheduleStep(new ImmediateComponentStep()
		{
			@Classname("shutdownNFPropertyProvider8")
			public IFuture execute(IInternalAccess ia)
			{
				INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
				return nfp.getComponentPropertyProvider().shutdownNFPropertyProvider();
			}
		});
	}
	
	//-------- service methods --------
	
	/**
	 *  Returns the declared names of all non-functional properties of this service.
	 *  @return The names of the non-functional properties of this service.
	 */
	public static IFuture getNFPropertyNames(IExternalAccess component, final IServiceIdentifier sid)
	{
		final Future ret = new Future();

		component.getExternalAccessAsync(sid.getProviderId()).addResultListener(new ExceptionDelegationResultListener(ret)
		{
			public void customResultAvailable(IExternalAccess result)
			{
				result.scheduleStep(new ImmediateComponentStep()
				{
					@Classname("getNFPropertyNames9")
					public IFuture execute(IInternalAccess ia)
					{
						INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
						return nfp.getProvidedServicePropertyProvider(sid).getNFPropertyNames();
					}
				}).addResultListener(new DelegationResultListener(ret));
			}
		});
		
		return ret;
	}
	
	/**
	 *  Returns the names of all non-functional properties of this service.
	 *  @return The names of the non-functional properties of this service.
	 */
	public static IFuture getNFAllPropertyNames(IExternalAccess component, final IServiceIdentifier sid)
	{
		final Future ret = new Future();
		
		component.getExternalAccessAsync(sid.getProviderId()).addResultListener(new ExceptionDelegationResultListener(ret)
		{
			public void customResultAvailable(IExternalAccess result)
			{
				result.scheduleStep(new ImmediateComponentStep()
				{
					@Classname("getNFAllPropertyNames10")
					public IFuture execute(IInternalAccess ia)
					{
						INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
						return nfp.getProvidedServicePropertyProvider(sid).getNFAllPropertyNames();
					}
				}).addResultListener(new DelegationResultListener(ret));
			}
		});
		
		return ret;
	}
	
	/**
	 *  Returns the meta information about a non-functional property of this service.
	 *  @param name Name of the property.
	 *  @return The meta information about a non-functional property of this service.
	 */
	public static IFuture> getNFPropertyMetaInfos(IExternalAccess component, final IServiceIdentifier sid)
	{
		final Future> ret = new Future>();
		
		component.getExternalAccessAsync(sid.getProviderId()).addResultListener(new ExceptionDelegationResultListener>(ret)
		{
			public void customResultAvailable(IExternalAccess result)
			{
				result.scheduleStep(new ImmediateComponentStep>()
				{
					@Classname("getNFPropertyMetaInfos11")
					public IFuture> execute(IInternalAccess ia)
					{
						INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
						if (nfp != null)
						{
							INFMixedPropertyProvider prov = nfp.getProvidedServicePropertyProvider(sid);
							if (prov != null)
							{
								IFuture> metainf = prov.getNFPropertyMetaInfos();
								if (metainf != null)
								{
									return metainf;
								}
							}
						}
						return new Future>(new HashMap());
					}
				}).addResultListener(new DelegationResultListener>(ret));
			}
		});

		return ret;
	}
	
	/**
	 *  Returns the meta information about a non-functional property of this service.
	 *  @param name Name of the property.
	 *  @return The meta information about a non-functional property of this service.
	 */
	public static IFuture getNFPropertyMetaInfo(IExternalAccess component, final IServiceIdentifier sid, final String name)
	{
		final Future ret = new Future();
		
		component.getExternalAccessAsync(sid.getProviderId()).addResultListener(new ExceptionDelegationResultListener(ret)
		{
			public void customResultAvailable(IExternalAccess result)
			{
				result.scheduleStep(new ImmediateComponentStep()
				{
					@Classname("getNFPropertyMetaInfo12")
					public IFuture execute(IInternalAccess ia)
					{
						INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
						return nfp.getProvidedServicePropertyProvider(sid).getNFPropertyMetaInfo(name);
					}
				}).addResultListener(new DelegationResultListener(ret));
			}
		});
		
		return ret;
	}
	
	/**
	 *  Returns the current value of a non-functional property of this service.
	 *  @param name Name of the property.
	 *  @param type Type of the property value.
	 *  @return The current value of a non-functional property of this service.
	 */
	public static  IFuture getNFPropertyValue(IExternalAccess component, final IServiceIdentifier sid, final String name)
	{
		final Future ret = new Future();
		
		component.getExternalAccessAsync(sid.getProviderId()).addResultListener(new ExceptionDelegationResultListener(ret)
		{
			public void customResultAvailable(IExternalAccess result)
			{
				result.scheduleStep(new ImmediateComponentStep()
				{
					@Classname("getNFPropertyValue13")
					public IFuture execute(IInternalAccess ia)
					{
						INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
						return nfp.getProvidedServicePropertyProvider(sid).getNFPropertyValue(name);
					}
				}).addResultListener(new DelegationResultListener(ret));
			}
		});

		return ret;
	}
	
	/**
	 *  Returns the current value of a non-functional property of this service, performs unit conversion.
	 *  @param name Name of the property.
	 *  @param type Type of the property value.
	 *  @param unit Unit of the property value.
	 *  @return The current value of a non-functional property of this service.
	 */
//	public  IFuture getNFPropertyValue(String name, Class unit);
	public static  IFuture getNFPropertyValue(IExternalAccess component, final IServiceIdentifier sid, final String name, final U unit)
	{
		final Future ret = new Future();
		
		component.getExternalAccessAsync(sid.getProviderId()).addResultListener(new ExceptionDelegationResultListener(ret)
		{
			public void customResultAvailable(IExternalAccess result)
			{
				result.scheduleStep(new ImmediateComponentStep()
				{
					@Classname("getNFPropertyValue14")
					public IFuture execute(IInternalAccess ia)
					{
						INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
						return nfp.getProvidedServicePropertyProvider(sid).getNFPropertyValue(name, unit);
					}
				}).addResultListener(new DelegationResultListener(ret));
			}
		});

		return ret;
	}
	
	/**
	 *  Add a non-functional property.
	 *  @param nfprop The property.
	 */
	public static IFuture addNFProperty(IExternalAccess component, final IServiceIdentifier sid, final INFProperty nfprop)
	{
		final Future ret = new Future();
		
		component.getExternalAccessAsync(sid.getProviderId()).addResultListener(new ExceptionDelegationResultListener(ret)
		{
			public void customResultAvailable(IExternalAccess result)
			{
				result.scheduleStep(new ImmediateComponentStep()
				{
					@Classname("addNFProperty15")
					public IFuture execute(IInternalAccess ia)
					{
						INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
						return nfp.getProvidedServicePropertyProvider(sid).addNFProperty(nfprop);
					}
				}).addResultListener(new DelegationResultListener(ret));
			}
		});

		return ret;
	}
	
	/**
	 *  Remove a non-functional property.
	 *  @param The name.
	 */
	public static IFuture removeNFProperty(IExternalAccess component, final IServiceIdentifier sid, final String name)
	{
		final Future ret = new Future();
		
		component.getExternalAccessAsync(sid.getProviderId()).addResultListener(new ExceptionDelegationResultListener(ret)
		{
			public void customResultAvailable(IExternalAccess result)
			{
				result.scheduleStep(new ImmediateComponentStep()
				{
					@Classname("removeNFProperty16")
					public IFuture execute(IInternalAccess ia)
					{
						INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
						return nfp.getProvidedServicePropertyProvider(sid).removeNFProperty(name);
					}
				}).addResultListener(new DelegationResultListener(ret));
			}
		});

		return ret;
	}
	
	/**
	 *  Shutdown the provider.
	 */
	public static IFuture shutdownNFPropertyProvider(IExternalAccess component, final IServiceIdentifier sid)
	{
		final Future ret = new Future();
		
		component.getExternalAccessAsync(sid.getProviderId()).addResultListener(new ExceptionDelegationResultListener(ret)
		{
			public void customResultAvailable(IExternalAccess result)
			{
				result.scheduleStep(new ImmediateComponentStep()
				{
					@Classname("shutdownNFPropertyProvider17")
					public IFuture execute(IInternalAccess ia)
					{
						INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
						return nfp.getProvidedServicePropertyProvider(sid).shutdownNFPropertyProvider();
					}
				}).addResultListener(new DelegationResultListener(ret));
			}
		});

		return ret;
	}
	
	//-------- provided service methods --------
	
	/**
	 *  Returns meta information about a non-functional properties of all methods.
	 *  @return The meta information about a non-functional properties.
	 */
	public static IFuture>> getMethodNFPropertyMetaInfos(IExternalAccess component, final IServiceIdentifier sid)
	{
		final Future>> ret = new Future>>();
		
		component.getExternalAccessAsync(sid.getProviderId()).addResultListener(new ExceptionDelegationResultListener>>(ret)
		{
			public void customResultAvailable(IExternalAccess result)
			{
				result.scheduleStep(new ImmediateComponentStep>>()
				{
					@Classname("getMethodNFPropertyMetaInfos18")
					public IFuture>> execute(IInternalAccess ia)
					{
						INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
						return nfp.getProvidedServicePropertyProvider(sid).getMethodNFPropertyMetaInfos();
					}
				}).addResultListener(new DelegationResultListener>>(ret));
			}
		});

		return ret;
	}
	
	/**
	 *  Returns the names of all non-functional properties of the specified method.
	 *  @param method The method targeted by this operation.
	 *  @return The names of the non-functional properties of the specified method.
	 */
	public static IFuture getMethodNFPropertyNames(IExternalAccess component, final IServiceIdentifier sid, final MethodInfo method)
	{
		final Future ret = new Future();
		
		component.getExternalAccessAsync(sid.getProviderId()).addResultListener(new ExceptionDelegationResultListener(ret)
		{
			public void customResultAvailable(IExternalAccess result)
			{
				result.scheduleStep(new ImmediateComponentStep()
				{
					@Classname("getMethodNFPropertyNames19")
					public IFuture execute(IInternalAccess ia)
					{
						INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
						return nfp.getProvidedServicePropertyProvider(sid).getMethodNFPropertyNames(method);
					}
				}).addResultListener(new DelegationResultListener(ret));
			}
		});

		return ret;
	}
	
	/**
	 *  Returns the names of all non-functional properties of this method.
	 *  This includes the properties of all parent components.
	 *  @return The names of the non-functional properties of this method.
	 */
	public static IFuture getMethodNFAllPropertyNames(IExternalAccess component, final IServiceIdentifier sid, final MethodInfo method)
	{
		final Future ret = new Future();
		
		component.getExternalAccessAsync(sid.getProviderId()).addResultListener(new ExceptionDelegationResultListener(ret)
		{
			public void customResultAvailable(IExternalAccess result)
			{
				result.scheduleStep(new ImmediateComponentStep()
				{
					@Classname("getMethodNFAllPropertyNames20")
					public IFuture execute(IInternalAccess ia)
					{
						INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
						return nfp.getProvidedServicePropertyProvider(sid).getMethodNFAllPropertyNames(method);
					}
				}).addResultListener(new DelegationResultListener(ret));
			}
		});

		return ret;
	}
	
	/**
	 *  Returns meta information about a non-functional properties of a method.
	 *  @return The meta information about a non-functional properties.
	 */
	public static IFuture> getMethodNFPropertyMetaInfos(IExternalAccess component, final IServiceIdentifier sid, final MethodInfo method)
	{
		final Future> ret = new Future>();
		
		component.getExternalAccessAsync(sid.getProviderId()).addResultListener(new ExceptionDelegationResultListener>(ret)
		{
			public void customResultAvailable(IExternalAccess result)
			{
				result.scheduleStep(new ImmediateComponentStep>()
				{
					@Classname("getMethodNFPropertyMetaInfos21")
					public IFuture> execute(IInternalAccess ia)
					{
						INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
						return nfp.getProvidedServicePropertyProvider(sid).getMethodNFPropertyMetaInfos(method);
					}
				}).addResultListener(new DelegationResultListener>(ret));
			}
		});

		return ret;
	}
	
	/**
	 *  Returns the meta information about a non-functional property of the specified method.
	 *  @param method The method targeted by this operation.
	 *  @param name Name of the property.
	 *  @return The meta information about a non-functional property of the specified method.
	 */
	public static IFuture getMethodNFPropertyMetaInfo(IExternalAccess component, final IServiceIdentifier sid, final MethodInfo method, final String name)
	{
		final Future ret = new Future();
		
		component.getExternalAccessAsync(sid.getProviderId()).addResultListener(new ExceptionDelegationResultListener(ret)
		{
			public void customResultAvailable(IExternalAccess result)
			{
				result.scheduleStep(new ImmediateComponentStep()
				{
					@Classname("getMethodNFPropertyMetaInfo22")
					public IFuture execute(IInternalAccess ia)
					{
						INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
						return nfp.getProvidedServicePropertyProvider(sid).getMethodNFPropertyMetaInfo(method, name);
					}
				}).addResultListener(new DelegationResultListener(ret));
			}
		});

		return ret;
	}
	
	/**
	 *  Returns the current value of a non-functional property of the specified method.
	 *  @param method The method targeted by this operation.
	 *  @param name Name of the property.
	 *  @param type Type of the property value.
	 *  @return The current value of a non-functional property of the specified method.
	 */
	public static  IFuture getMethodNFPropertyValue(IExternalAccess component, final IServiceIdentifier sid, final MethodInfo method, final String name)
	{
		final Future ret = new Future();
		
		component.getExternalAccessAsync(sid.getProviderId()).addResultListener(new ExceptionDelegationResultListener(ret)
		{
			public void customResultAvailable(IExternalAccess result)
			{
				result.scheduleStep(new ImmediateComponentStep()
				{
					@Classname("getMethodNFPropertyValue23")
					public IFuture execute(IInternalAccess ia)
					{
						INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
						return nfp.getProvidedServicePropertyProvider(sid).getMethodNFPropertyValue(method, name);
					}
				}).addResultListener(new DelegationResultListener(ret));
			}
		});
		
//		ret.addResultListener(new IResultListener()
//		{
//			public void resultAvailable(T result)
//			{
//				System.out.println("t: "+result);
//			}
//
//			public void exceptionOccurred(Exception exception)
//			{
//				System.out.println("ex: "+exception);
//			}
//		});
		
		return ret;
	}
	
	/**
	 *  Returns the current value of a non-functional property of the specified method, performs unit conversion.
	 *  @param method The method targeted by this operation.
	 *  @param name Name of the property.
	 *  @param type Type of the property value.
	 *  @param unit Unit of the property value.
	 *  @return The current value of a non-functional property of the specified method.
	 */
//	public  IFuture getNFPropertyValue(Method method, String name, Class unit);
	public static  IFuture getMethodNFPropertyValue(IExternalAccess component, final IServiceIdentifier sid, final MethodInfo method, final String name, final U unit)
	{
		final Future ret = new Future();
		
		component.getExternalAccessAsync(sid.getProviderId()).addResultListener(new ExceptionDelegationResultListener(ret)
		{
			public void customResultAvailable(IExternalAccess result)
			{
				result.scheduleStep(new ImmediateComponentStep()
				{
					@Classname("getMethodNFPropertyValue24")
					public IFuture execute(IInternalAccess ia)
					{
						INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
						return nfp.getProvidedServicePropertyProvider(sid).getMethodNFPropertyValue(method, name, unit);
					}
				}).addResultListener(new DelegationResultListener(ret));
			}
		});

		return ret;
	}
	
	/**
	 *  Add a non-functional property.
	 *  @param method The method targeted by this operation.
	 *  @param nfprop The property.
	 */
	public static IFuture addMethodNFProperty(IExternalAccess component, final IServiceIdentifier sid, final MethodInfo method, final INFProperty nfprop)
	{
		final Future ret = new Future();
		
		component.getExternalAccessAsync(sid.getProviderId()).addResultListener(new ExceptionDelegationResultListener(ret)
		{
			public void customResultAvailable(IExternalAccess result)
			{
				result.scheduleStep(new ImmediateComponentStep()
				{
					@Classname("addMethodNFProperty25")
					public IFuture execute(IInternalAccess ia)
					{
						INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
						return nfp.getProvidedServicePropertyProvider(sid).addMethodNFProperty(method, nfprop);
					}
				}).addResultListener(new DelegationResultListener(ret));
			}
		});

		return ret;
	}
	
	/**
	 *  Remove a non-functional property.
	 *  @param method The method targeted by this operation.
	 *  @param The name.
	 */
	public static IFuture removeMethodNFProperty(IExternalAccess component, final IServiceIdentifier sid, final MethodInfo method, final String name)
	{
		final Future ret = new Future();
		
		component.getExternalAccessAsync(sid.getProviderId()).addResultListener(new ExceptionDelegationResultListener(ret)
		{
			public void customResultAvailable(IExternalAccess result)
			{
				result.scheduleStep(new ImmediateComponentStep()
				{
					@Classname("removeMethodNFProperty26")
					public IFuture execute(IInternalAccess ia)
					{
						INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
						return nfp.getProvidedServicePropertyProvider(sid).removeMethodNFProperty(method, name);
					}
				}).addResultListener(new DelegationResultListener(ret));
			}
		});

		return ret;
	}

	//-------- required properties --------
	
	/**
	 *  Returns the declared names of all non-functional properties of this service.
	 *  @return The names of the non-functional properties of this service.
	 */
	public static IFuture getRequiredNFPropertyNames(IExternalAccess component, final IServiceIdentifier sid)
	{
		return component.scheduleStep(new ImmediateComponentStep()
		{
			@Classname("getRequiredNFPropertyNames27")
			public IFuture execute(IInternalAccess ia)
			{
				INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
				return nfp.getRequiredServicePropertyProvider(sid).getNFPropertyNames();
			}
		});
	}
	
	/**
	 *  Returns the names of all non-functional properties of this service.
	 *  @return The names of the non-functional properties of this service.
	 */
	public static IFuture getRequiredNFAllPropertyNames(IExternalAccess component, final IServiceIdentifier sid)
	{
		return component.scheduleStep(new ImmediateComponentStep()
		{
			@Classname("getRequiredNFAllPropertyNames28")
			public IFuture execute(IInternalAccess ia)
			{
				INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
				return nfp.getRequiredServicePropertyProvider(sid).getNFAllPropertyNames();
			}
		});
	}
	
	/**
	 *  Returns the meta information about a non-functional property of this service.
	 *  @param name Name of the property.
	 *  @return The meta information about a non-functional property of this service.
	 */
	public static IFuture> getRequiredNFPropertyMetaInfos(IExternalAccess component, final IServiceIdentifier sid)
	{
		return component.scheduleStep(new ImmediateComponentStep>()
		{
			@Classname("getRequiredNFPropertyMetaInfos29")
			public IFuture> execute(IInternalAccess ia)
			{
				INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
				return nfp.getRequiredServicePropertyProvider(sid).getNFPropertyMetaInfos();
			}
		});
	}
	
	/**
	 *  Returns the meta information about a non-functional property of this service.
	 *  @param name Name of the property.
	 *  @return The meta information about a non-functional property of this service.
	 */
	public static IFuture getRequiredNFPropertyMetaInfo(IExternalAccess component, final IServiceIdentifier sid, final String name)
	{
		return component.scheduleStep(new ImmediateComponentStep()
		{
			@Classname("getRequiredNFPropertyMetaInfo30")
			public IFuture execute(IInternalAccess ia)
			{
				INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
				return nfp.getRequiredServicePropertyProvider(sid).getNFPropertyMetaInfo(name);
			}
		});
	}
	
	/**
	 *  Returns the current value of a non-functional property of this service.
	 *  @param name Name of the property.
	 *  @param type Type of the property value.
	 *  @return The current value of a non-functional property of this service.
	 */
	public static  IFuture getRequiredNFPropertyValue(IExternalAccess component, final IServiceIdentifier sid, final String name)
	{
		return component.scheduleStep(new ImmediateComponentStep()
		{
			@Classname("getRequiredNFPropertyValue31")
			public IFuture execute(IInternalAccess ia)
			{
				INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
				return nfp.getRequiredServicePropertyProvider(sid).getNFPropertyValue(name);
			}
		});
	}
	
	/**
	 *  Returns the current value of a non-functional property of this service, performs unit conversion.
	 *  @param name Name of the property.
	 *  @param type Type of the property value.
	 *  @param unit Unit of the property value.
	 *  @return The current value of a non-functional property of this service.
	 */
//	public  IFuture getNFPropertyValue(String name, Class unit);
	public static  IFuture getRequiredNFPropertyValue(IExternalAccess component, final IServiceIdentifier sid, final String name, final U unit)
	{
		return component.scheduleStep(new ImmediateComponentStep()
		{
			@Classname("getRequiredNFPropertyValue32")
			public IFuture execute(IInternalAccess ia)
			{
				INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
				return nfp.getRequiredServicePropertyProvider(sid).getNFPropertyValue(name, unit);
			}
		});
	}
	
	/**
	 *  Add a non-functional property.
	 *  @param nfprop The property.
	 */
	public static IFuture addRequiredNFProperty(IExternalAccess component, final IServiceIdentifier sid, final INFProperty nfprop)
	{
		return component.scheduleStep(new ImmediateComponentStep()
		{
			@Classname("addRequiredNFProperty33")
			public IFuture execute(IInternalAccess ia)
			{
				INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
				return nfp.getRequiredServicePropertyProvider(sid).addNFProperty(nfprop);
			}
		});
	}
	
	/**
	 *  Remove a non-functional property.
	 *  @param The name.
	 */
	public static IFuture removeRequiredNFProperty(IExternalAccess component, final IServiceIdentifier sid, final String name)
	{
		return component.scheduleStep(new ImmediateComponentStep()
		{
			@Classname("removeRequiredNFProperty34")
			public IFuture execute(IInternalAccess ia)
			{
				INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
				return nfp.getRequiredServicePropertyProvider(sid).removeNFProperty(name);
			}
		});
	}
	
	/**
	 *  Shutdown the provider.
	 */
	public static IFuture shutdownRequiredNFPropertyProvider(IExternalAccess component, final IServiceIdentifier sid)
	{
		return component.scheduleStep(new ImmediateComponentStep()
		{
			@Classname("shutdownRequiredNFPropertyProvider35")
			public IFuture execute(IInternalAccess ia)
			{
				INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
				return nfp.getRequiredServicePropertyProvider(sid).shutdownNFPropertyProvider();
			}
		});
	}
	
	/**
	 *  Returns meta information about a non-functional properties of all methods.
	 *  @return The meta information about a non-functional properties.
	 */
	public static IFuture>> getRequiredMethodNFPropertyMetaInfos(IExternalAccess component, final IServiceIdentifier sid)
	{
		return component.scheduleStep(new ImmediateComponentStep>>()
		{
			@Classname("getRequiredMethodNFPropertyMetaInfos36")
			public IFuture>> execute(IInternalAccess ia)
			{
				INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
				return nfp.getRequiredServicePropertyProvider(sid).getMethodNFPropertyMetaInfos();
			}
		});
	}
	
	/**
	 *  Returns the names of all non-functional properties of the specified method.
	 *  @param method The method targeted by this operation.
	 *  @return The names of the non-functional properties of the specified method.
	 */
	public static IFuture getRequiredMethodNFPropertyNames(IExternalAccess component, final IServiceIdentifier sid, final MethodInfo method)
	{
		return component.scheduleStep(new ImmediateComponentStep()
		{
			@Classname("getRequiredMethodNFPropertyNames37")
			public IFuture execute(IInternalAccess ia)
			{
				INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
				return nfp.getRequiredServicePropertyProvider(sid).getMethodNFPropertyNames(method);
			}
		});
	}
	
	/**
	 *  Returns the names of all non-functional properties of this method.
	 *  This includes the properties of all parent components.
	 *  @return The names of the non-functional properties of this method.
	 */
	public static IFuture getRequiredMethodNFAllPropertyNames(IExternalAccess component, final IServiceIdentifier sid, final MethodInfo method)
	{
		return component.scheduleStep(new ImmediateComponentStep()
		{
			@Classname("getRequiredMethodNFAllPropertyNames38")
			public IFuture execute(IInternalAccess ia)
			{
				INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
				return nfp.getRequiredServicePropertyProvider(sid).getMethodNFAllPropertyNames(method);
			}
		});
	}
	
	/**
	 *  Returns meta information about a non-functional properties of a method.
	 *  @return The meta information about a non-functional properties.
	 */
	public static IFuture> getRequiredMethodNFPropertyMetaInfos(IExternalAccess component, final IServiceIdentifier sid, final MethodInfo method)
	{
		return component.scheduleStep(new ImmediateComponentStep>()
		{
			@Classname("getRequiredMethodNFPropertyMetaInfos39")
			public IFuture> execute(IInternalAccess ia)
			{
				INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
				return nfp.getRequiredServicePropertyProvider(sid).getMethodNFPropertyMetaInfos(method);
			}
		});
	}
	
	/**
	 *  Returns the meta information about a non-functional property of the specified method.
	 *  @param method The method targeted by this operation.
	 *  @param name Name of the property.
	 *  @return The meta information about a non-functional property of the specified method.
	 */
	public static IFuture getRequiredMethodNFPropertyMetaInfo(IExternalAccess component, final IServiceIdentifier sid, final MethodInfo method, final String name)
	{
		return component.scheduleStep(new ImmediateComponentStep()
		{
			@Classname("getRequiredMethodNFPropertyMetaInfo40")
			public IFuture execute(IInternalAccess ia)
			{
				INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
				return nfp.getRequiredServicePropertyProvider(sid).getMethodNFPropertyMetaInfo(method, name);
			}
		});
	}
	
	/**
	 *  Returns the current value of a non-functional property of the specified method.
	 *  @param method The method targeted by this operation.
	 *  @param name Name of the property.
	 *  @param type Type of the property value.
	 *  @return The current value of a non-functional property of the specified method.
	 */
	public static  IFuture getRequiredMethodNFPropertyValue(IExternalAccess component, final IServiceIdentifier sid, final MethodInfo method, final String name)
	{
		return component.scheduleStep(new ImmediateComponentStep()
		{
			@Classname("getRequiredMethodNFPropertyValue41")
			public IFuture execute(IInternalAccess ia)
			{
				INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
				return nfp.getRequiredServicePropertyProvider(sid).getMethodNFPropertyValue(method, name);
			}
		});
	}
	
	/**
	 *  Returns the current value of a non-functional property of the specified method, performs unit conversion.
	 *  @param method The method targeted by this operation.
	 *  @param name Name of the property.
	 *  @param type Type of the property value.
	 *  @param unit Unit of the property value.
	 *  @return The current value of a non-functional property of the specified method.
	 */
//	public  IFuture getNFPropertyValue(Method method, String name, Class unit);
	public static  IFuture getRequiredMethodNFPropertyValue(IExternalAccess component, final IServiceIdentifier sid, final MethodInfo method, final String name, final U unit)
	{
		return component.scheduleStep(new ImmediateComponentStep()
		{
			@Classname("getRequiredMethodNFPropertyValue42")
			public IFuture execute(IInternalAccess ia)
			{
				INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
				return nfp.getRequiredServicePropertyProvider(sid).getMethodNFPropertyValue(method, name, unit);
			}
		});
	}
	
	/**
	 *  Add a non-functional property.
	 *  @param method The method targeted by this operation.
	 *  @param nfprop The property.
	 */
	public static IFuture addRequiredMethodNFProperty(IExternalAccess component, final IServiceIdentifier sid, final MethodInfo method, final INFProperty nfprop)
	{
		return component.scheduleStep(new ImmediateComponentStep()
		{
			@Classname("addRequiredMethodNFProperty43")
			public IFuture execute(IInternalAccess ia)
			{
				INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
				return nfp.getRequiredServicePropertyProvider(sid).addMethodNFProperty(method, nfprop);
			}
		});
	}
	
	/**
	 *  Remove a non-functional property.
	 *  @param method The method targeted by this operation.
	 *  @param The name.
	 */
	public static IFuture removeRequiredMethodNFProperty(IExternalAccess component, final IServiceIdentifier sid, final MethodInfo method, final String name)
	{
		return component.scheduleStep(new ImmediateComponentStep()
		{
			@Classname("removeRequiredMethodNFProperty44")
			public IFuture execute(IInternalAccess ia)
			{
				INFPropertyComponentFeature nfp = ia.getFeature(INFPropertyComponentFeature.class);
				return nfp.getRequiredServicePropertyProvider(sid).removeMethodNFProperty(method, name);
			}
		});
	}
	
}