src/main/java/js/net/HttpRmiServlet.java
private static ManagedMethodSPI getManagedMethod(ManagedClassSPI managedClass, String methodName, String requestURI) throws NoSuchMethodException {
		ManagedMethodSPI managedMethod = managedClass.getNetMethod(methodName);
		if (managedMethod == null) {
			log.error("HTTP-RMI request for not existing managed method |%s#%s|.", managedClass.getInterfaceClass().getName(), methodName);
			throw new NoSuchMethodException(requestURI);
		}
		if (!managedMethod.isRemotelyAccessible()) {
			log.error("HTTP-RMI request for local managed method |%s#%s|. See @Remote annotation.", managedClass.getInterfaceClass().getName(), methodName);
			throw new NoSuchMethodException(requestURI);
		}
		if (Types.isKindOf(managedMethod.getReturnType(), Resource.class)) {
			log.error("HTTP-RMI request for managed method |%s#%s| returning a resource.", managedClass.getInterfaceClass().getName(), methodName);
			throw new NoSuchMethodException(requestURI);
		}
		return managedMethod;
	}
private static ManagedMethodSPI getManagedMethod(ManagedClassSPI managedClass, String methodName, String requestURI) throws NoSuchMethodException {
		ManagedMethodSPI managedMethod = managedClass.getNetMethod(methodName);
		if (managedMethod == null) {
			log.error("HTTP-RMI request for not existing managed method |%s#%s|.", managedClass.getInterfaceClass().getName(), methodName);
			throw new NoSuchMethodException(requestURI);
		}
		if (!managedMethod.isRemotelyAccessible()) {
			log.error("HTTP-RMI request for local managed method |%s#%s|. See @Remote annotation.", managedClass.getInterfaceClass().getName(), methodName);
			throw new NoSuchMethodException(requestURI);
		}
		if (Types.isKindOf(managedMethod.getReturnType(), Resource.class)) {
			log.error("HTTP-RMI request for managed method |%s#%s| returning a resource.", managedClass.getInterfaceClass().getName(), methodName);
			throw new NoSuchMethodException(requestURI);
		}
		return managedMethod;
	}
private static ManagedMethodSPI getManagedMethod ( ManagedClassSPI managedClass , String methodName , String requestURI ) throws NoSuchMethodException { ManagedMethodSPI managedMethod = managedClass . getNetMethod ( methodName ) ; if ( managedMethod == null ) { log . error ( "HTTP-RMI request for not existing managed method |%s#%s|." , managedClass . getInterfaceClass ( ) . getName ( ) , methodName ) ; throw new NoSuchMethodException ( requestURI ) ; } if ( ! managedMethod . isRemotelyAccessible ( ) ) { log . error ( "HTTP-RMI request for local managed method |%s#%s|. See @Remote annotation." , managedClass . getInterfaceClass ( ) . getName ( ) , methodName ) ; throw new NoSuchMethodException ( requestURI ) ; } if ( Types . isKindOf ( managedMethod . getReturnType ( ) , Resource . class ) ) { log . error ( "HTTP-RMI request for managed method |%s#%s| returning a resource." , managedClass . getInterfaceClass ( ) . getName ( ) , methodName ) ; throw new NoSuchMethodException ( requestURI ) ; } return managedMethod ; }
Get managed method that is remotely accessible and has requested name.

@param managedClass managed class where method is supposed to be declared,
@param methodName method name,
@param requestURI request URI for logging.
@return managed method, never null.
@throws NoSuchMethodException if managed class has not any method with requested name, managed method was found but is
not remotely accessible or it returns a {@link Resource}.
Get managed method that is remotely accessible and has requested name .