* @throws Exception is thrown if error creating the profile
*/
public ThreadPoolProfile asThreadPoolProfile(CamelContext context) throws Exception {
ObjectHelper.notNull(context, "CamelContext", this);
ThreadPoolProfileSupport answer = new ThreadPoolProfileSupport(getId());
answer.setDefaultProfile(getDefaultProfile());
answer.setPoolSize(CamelContextHelper.parseInteger(context, getPoolSize()));
answer.setMaxPoolSize(CamelContextHelper.parseInteger(context, getMaxPoolSize()));
answer.setKeepAliveTime(CamelContextHelper.parseLong(context, getKeepAliveTime()));
answer.setMaxQueueSize(CamelContextHelper.parseInteger(context, getMaxQueueSize()));
answer.setRejectedPolicy(getRejectedPolicy());
answer.setTimeUnit(getTimeUnit());
return answer;
}