code: private void registerNativeFunctionHandler(String url,
  			HandlerDefinition handlerDefinition,
  			Class<? extends AbstractNativeFunctionHandler> handlerClassType)
  			throws SecurityException, NoSuchMethodException {
  		NativeFunction atmosFunction = (NativeFunction) handlerDefinition
  				.getHandler();
  		Object atmosHandler = getHandler(atmosFunction, handlerClassType);
  		Class<?> handlerType = (atmosHandler instanceof String) ? getApplicationContext()
  				.getType((String) atmosHandler) : atmosHandler.getClass();
  
  		if (atmosHandler instanceof NativeFunctionModelAndViewHandler) {
  			((NativeFunctionModelAndViewHandler) atmosHandler)
  					.setViewName(handlerMappingInfoStorage.getViewName(url));
  		}
  
  		final Class<?> userType = ClassUtils.getUserClass(handlerType);
  
  		Method method = userType.getMethod(
  				AbstractNativeFunctionHandler.HANDLER_METHOD_NAME,
  				HttpServletRequest.class, HttpServletResponse.class);
  
  		RequestMethodsRequestCondition requestMethodsRequestCondition = getRequestMethodsRequestCondition(handlerDefinition
  				.getHttpMethods());
  
  		RequestMappingInfo mapping = new RequestMappingInfo(
  				new PatternsRequestCondition(url),
  				requestMethodsRequestCondition, null, null, null,
  				/* new ProducesRequestCondition("application/xml") */null, null);
  
  		registerHandlerMethod(atmosHandler, method, mapping);
  	}
docs: register handler
  @param url
  @param handlerDefinition
  @param handlerClassType
  @throws SecurityException
  @throws NoSuchMethodException