Package org.apache.muse.core.routing

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


        return entry.getEndpointReference();
    }
   
    protected MessageHandler createAddHandler()
    {
        MessageHandler handler = new AddHandler();
       
        Method method = ReflectUtils.getFirstMethod(getClass(), "add");
        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

        _topicListeners.put(listener.getTopic(), listener);
    }
   
    protected MessageHandler createNotifyHandler()
    {
        MessageHandler handler = new NotifyHandler();
        Method method = null;
       
        try
        {
            //
            // can't use ReflectUtils.getFirstMethod() because it might
            // return Object.notify()
            //
            method = getClass().getMethod("notify", new Class[]{ NotificationMessage[].class });
        }
       
        catch (Throwable error)
        {
            throw new RuntimeException(error.getMessage(), error);
        }
       
        handler.setMethod(method);
        return handler;
    }
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

                getContextPath());

            return wsaFault.toXML();
        }
       
        MessageHandler handler = capability.getMessageHandler(action);
        Method method = handler.getMethod();
       
        try
        {
          Object[]parameters = handler.fromXML(requestBody);
            Object result = method.invoke(capability, parameters);
            return handler.toXML(result);
        }
        catch (Throwable throwable)
        {
          LOGGER.error(
              throwable,
View Full Code Here

              name+"Response",
              Names.PREFIX);
         
          String actionURI = Names.NAMESPACE_URI+"/"+name;
           
          MessageHandler handler = new QManMessageHandler(
                actionURI,
                requestName,
                returnValueName);
           
          handler.setMethod(method);
            handlers.add(handler);
        }
        return handlers; 
    }
View Full Code Here

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

            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

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.