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 .