Package org.apache.muse.core.routing

Examples of org.apache.muse.core.routing.MessageHandler


            Object[] filler = { getContextPath(), action };
            SoapFault fault = new SoapFault(_MESSAGES.get("ActionNotSupported", filler));
            return fault.toXML();
        }
       
        MessageHandler handler = capability.getMessageHandler(action);
        Method method = handler.getMethod();
       
        Object[] parameters = null;
       
        try
        {
            //
            // translate from XML -> POJO. the reflection call will take
            // care of casting the generic Object references to the actual
            // method parameter types
            //
            parameters = handler.fromXML(soapBody);
           
            //
            // invoke operation and translate result to XML
            //
            Object result = method.invoke(capability, parameters);
           
            return handler.toXML(result);
        }
       
        catch (Throwable error)
        {
            //
View Full Code Here


        return relationship;
    }

    protected MessageHandler createQueryHandler()
    {
        MessageHandler handler = new QueryRelationshipsHandler();
       
        Method method = ReflectUtils.getFirstMethod(getClass(), "queryRelationshipsByType");
        handler.setMethod(method);
       
        return handler;
    }
View Full Code Here

    //
    private Timer _terminationTimer = null;
   
    protected MessageHandler createSetTerminationTimeHandler()
    {
        MessageHandler handler = new SetTerminationTimeHandler();
       
        Method method = ReflectUtils.getFirstMethod(getClass(), "setTerminationTime");
        handler.setMethod(method);
       
        return handler;
    }
View Full Code Here

public class SimpleSetCapability
    extends AbstractWsResourceCapability implements SetCapability
{
    protected MessageHandler createSetHandler()
    {
        MessageHandler handler = new SetHandler();
       
        Method method = ReflectUtils.getFirstMethod(getClass(), "setResourceProperties");
        handler.setMethod(method);
       
        return handler;
    }
View Full Code Here

            String methodName = getMethodName(localName);
            Method method = (Method)methodsByName.get(methodName);
           
            if (method != null)
            {
                MessageHandler handler = createMessageHandler(action, inputName, outputName);
                handler.setMethod(method);
           
                handlers.add(handler);
               
                i.remove();
            }
View Full Code Here

{
    private static final Element[] _NOT_FOUND = new Element[0];
   
    protected MessageHandler createGetMetadataHandler()
    {
        MessageHandler handler = new GetMetadataHandler();
       
        try
        {
            Method method = ReflectUtils.getFirstMethod(getClass(), "getMetadata");
            handler.setMethod(method);
        }
       
        catch (Throwable error)
        {
            throw new RuntimeException(error.getMessage(), error);
View Full Code Here

public class SimpleGetCapability
    extends AbstractWsResourceCapability implements GetCapability
{
    protected MessageHandler createGetDocumentHandler()
    {
        MessageHandler handler = new GetDocumentHandler();
       
        Method method = ReflectUtils.getFirstMethod(getClass(), "getResourcePropertyDocument");
        handler.setMethod(method);
       
        return handler;
    }
View Full Code Here

        return handler;
    }
   
    protected MessageHandler createGetHandler()
    {
        MessageHandler handler = new GetHandler();
       
        Method method = ReflectUtils.getFirstMethod(getClass(), "getResourceProperty");
        handler.setMethod(method);
       
        return handler;
    }
View Full Code Here

        return handler;
    }
   
    protected MessageHandler createGetMultipleHandler()
    {
        MessageHandler handler = new GetMultipleHandler();
       
        Method method = ReflectUtils.getFirstMethod(getClass(), "getMultipleResourceProperties");
        handler.setMethod(method);
       
        return handler;
    }
View Full Code Here

        return new XPathQueryExpressionFactory();
    }
   
    protected MessageHandler createQueryHandler()
    {
        MessageHandler handler = new QueryHandler();
       
        Method method = ReflectUtils.getFirstMethod(getClass(), "queryResourceProperties");
        handler.setMethod(method);
       
        return handler;
    }
View Full Code Here

TOP

Related Classes of org.apache.muse.core.routing.MessageHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.