for (int i = 0; i < methods.length; i++) { final Method method = methods[i]; if (!isHandlerMethod(method)) { continue; String name = (String) entry.getKey(); Method[] mArray = (Method[]) entry.getValue(); handlerMap.put(name, newXmlRpcHandler(pType, mArray));
public String getMethodHelp(String pHandlerName) throws XmlRpcException { XmlRpcHandler h = getHandler(pHandlerName); if (h instanceof XmlRpcMetaDataHandler) return ((XmlRpcMetaDataHandler)h).getMethodHelp(); throw new XmlRpcNoSuchHandlerException("No help available for method: " + pHandlerName); }
/** Creates a new instance of {@link XmlRpcHandler}. * @param pClass The class, which was inspected for handler * methods. This is used for error messages only. Typically, * it is the same than <pre>pInstance.getClass()</pre>. * @param pMethods The method being invoked. */ protected XmlRpcHandler newXmlRpcHandler(final Class pClass, final Method[] pMethods) throws XmlRpcException { String[][] sig = getSignature(pMethods); String help = getMethodHelp(pClass, pMethods); RequestProcessorFactory factory = requestProcessorFactoryFactory.getRequestProcessorFactory(pClass); if (sig == null || help == null) { return new ReflectiveXmlRpcHandler(this, typeConverterFactory, pClass, factory, pMethods); } return new ReflectiveXmlRpcMetaDataHandler(this, typeConverterFactory, pClass, factory, pMethods, sig, help); }
public Object execute(XmlRpcRequest pRequest) throws XmlRpcException { AuthenticationHandler authHandler = mapping.getAuthenticationHandler(); if (authHandler != null && !authHandler.isAuthorized(pRequest)) { throw new XmlRpcNotAuthorizedException("Not authorized");
@Override protected boolean isHandlerMethod( final Method pMethod ) { return super.isHandlerMethod( pMethod ) && ( !pMethod.getName().equals( "invoke" ) ); }
protected boolean isHandlerMethod(Method pMethod) { if (!Modifier.isPublic(pMethod.getModifiers())) { return false; // Ignore methods, which aren't public } if (Modifier.isStatic(pMethod.getModifiers())) { return false; // Ignore methods, which are static } if (!isVoidMethodEnabled() && pMethod.getReturnType() == void.class) { return false; // Ignore void methods. } if (pMethod.getDeclaringClass() == Object.class) { return false; // Ignore methods from Object.class } return true; }
@Override protected XmlRpcHandler newXmlRpcHandler( @SuppressWarnings( "rawtypes" ) final Class pClass, final Method[] pMethods ) throws XmlRpcException { if ( this.handler != null ) { RequestProcessorFactory factory = getRequestProcessorFactoryFactory().getRequestProcessorFactory( pClass ); factory = new RequestProcessorFactory() { @Override public Object getRequestProcessor( final XmlRpcRequest pRequest ) throws XmlRpcException { return handler; } }; return new ReflectiveXmlRpcHandler( this, getTypeConverterFactory(), pClass, factory, pMethods); } else { return super.newXmlRpcHandler( pClass, pMethods ); } }
public Object execute(XmlRpcRequest pRequest) throws XmlRpcException { AuthenticationHandler authHandler = mapping.getAuthenticationHandler(); if (authHandler != null && !authHandler.isAuthorized(pRequest)) { throw new XmlRpcNotAuthorizedException("Not authorized");
protected boolean isHandlerMethod(Method pMethod) { if (!Modifier.isPublic(pMethod.getModifiers())) { return false; // Ignore methods, which aren't public } if (Modifier.isStatic(pMethod.getModifiers())) { return false; // Ignore methods, which are static } if (!isVoidMethodEnabled() && pMethod.getReturnType() == void.class) { return false; // Ignore void methods. } if (pMethod.getDeclaringClass() == Object.class) { return false; // Ignore methods from Object.class } return true; }
for (int i = 0; i < methods.length; i++) { final Method method = methods[i]; if (!isHandlerMethod(method)) { continue; String name = (String) entry.getKey(); Method[] mArray = (Method[]) entry.getValue(); handlerMap.put(name, newXmlRpcHandler(pType, mArray));
public Object execute( XmlRpcRequest pRequest ) throws XmlRpcException AbstractReflectiveHandlerMapping.AuthenticationHandler authHandler = mapping.getAuthenticationHandler(); if ( authHandler != null && !authHandler.isAuthorized( pRequest ) )
/** Creates a new instance of {@link XmlRpcHandler}. * @param pClass The class, which was inspected for handler * methods. This is used for error messages only. Typically, * it is the same than <pre>pInstance.getClass()</pre>. * @param pMethods The method being invoked. */ protected XmlRpcHandler newXmlRpcHandler(final Class pClass, final Method[] pMethods) throws XmlRpcException { String[][] sig = getSignature(pMethods); String help = getMethodHelp(pClass, pMethods); RequestProcessorFactory factory = requestProcessorFactoryFactory.getRequestProcessorFactory(pClass); if (sig == null || help == null) { return new ReflectiveXmlRpcHandler(this, typeConverterFactory, pClass, factory, pMethods); } return new ReflectiveXmlRpcMetaDataHandler(this, typeConverterFactory, pClass, factory, pMethods, sig, help); }
public String[][] getMethodSignature(String pHandlerName) throws XmlRpcException { XmlRpcHandler h = getHandler(pHandlerName); if (h instanceof XmlRpcMetaDataHandler) return ((XmlRpcMetaDataHandler)h).getSignatures(); throw new XmlRpcNoSuchHandlerException("No metadata available for method: " + pHandlerName); }
protected boolean isHandlerMethod(Method pMethod) { if (!Modifier.isPublic(pMethod.getModifiers())) { return false; // Ignore methods, which aren't public } if (Modifier.isStatic(pMethod.getModifiers())) { return false; // Ignore methods, which are static } if (!isVoidMethodEnabled() && pMethod.getReturnType() == void.class) { return false; // Ignore void methods. } if (pMethod.getDeclaringClass() == Object.class) { return false; // Ignore methods from Object.class } return true; }
for (int i = 0; i < methods.length; i++) { final Method method = methods[i]; if (!isHandlerMethod(method)) { continue; String name = (String) entry.getKey(); Method[] mArray = (Method[]) entry.getValue(); handlerMap.put(name, newXmlRpcHandler(pType, mArray));
public Object execute( XmlRpcRequest pRequest ) throws XmlRpcException AbstractReflectiveHandlerMapping.AuthenticationHandler authHandler = mapping.getAuthenticationHandler(); if ( authHandler != null && !authHandler.isAuthorized( pRequest ) )
/** Creates a new instance of {@link XmlRpcHandler}. * @param pClass The class, which was inspected for handler * methods. This is used for error messages only. Typically, * it is the same than <pre>pInstance.getClass()</pre>. * @param pMethods The method being invoked. */ protected XmlRpcHandler newXmlRpcHandler(final Class pClass, final Method[] pMethods) throws XmlRpcException { String[][] sig = getSignature(pMethods); String help = getMethodHelp(pClass, pMethods); RequestProcessorFactory factory = requestProcessorFactoryFactory.getRequestProcessorFactory(pClass); if (sig == null || help == null) { return new ReflectiveXmlRpcHandler(this, typeConverterFactory, pClass, factory, pMethods); } return new ReflectiveXmlRpcMetaDataHandler(this, typeConverterFactory, pClass, factory, pMethods, sig, help); }
public String getMethodHelp(String pHandlerName) throws XmlRpcException { XmlRpcHandler h = getHandler(pHandlerName); if (h instanceof XmlRpcMetaDataHandler) return ((XmlRpcMetaDataHandler)h).getMethodHelp(); throw new XmlRpcNoSuchHandlerException("No help available for method: " + pHandlerName); }
public Object execute(XmlRpcRequest pRequest) throws XmlRpcException { AuthenticationHandler authHandler = mapping.getAuthenticationHandler(); if (authHandler != null && !authHandler.isAuthorized(pRequest)) { throw new XmlRpcNotAuthorizedException("Not authorized");
public String[][] getMethodSignature(String pHandlerName) throws XmlRpcException { XmlRpcHandler h = getHandler(pHandlerName); if (h instanceof XmlRpcMetaDataHandler) return ((XmlRpcMetaDataHandler)h).getSignatures(); throw new XmlRpcNoSuchHandlerException("No metadata available for method: " + pHandlerName); }