class MethodEndpoint {

	public Object invoke(Object... args) throws Exception {
		Object endpoint = getBean();
		ReflectionUtils.makeAccessible(method);
		try {
			return method.invoke(endpoint, args);
		} catch (InvocationTargetException ex) {
			handleInvocationTargetException(ex);
			throw new IllegalStateException("Unexpected exception thrown by method - "
					+ ex.getTargetException().getClass().getName() + ": " + ex.getTargetException().getMessage());
		}
	}

	public  MethodEndpoint(Object bean, Method method);
	public  MethodEndpoint(Object bean, String methodName, Class<?>... parameterTypes);
	public  MethodEndpoint(String beanName, BeanFactory beanFactory, Method method);

}