Package org.apache.muse.core

Examples of org.apache.muse.core.Capability


        Iterator i = getCapabilityDefinitions().iterator();
       
        while (i.hasNext())
        {
            CapabilityDefinition next = (CapabilityDefinition)i.next();
            Capability capability = next.newInstance();           
            resource.addCapability(capability);
        }
       
        return resource;
    }
View Full Code Here


   
    public Capability newInstance()
    {
        Class theClass = getImplementationClass();
       
        Capability capability = (Capability)ReflectUtils.newInstance(theClass);
        capability.setCapabilityURI(getURI());
        capability.setMessageHandlers(getMessageHandlers());
        capability.setInitializationParameters(getInitializationParameters());
       
        PersistenceDefinition persistenceDef = getPersistenceDefinition();
       
        if (persistenceDef != null)
        {
            Persistence persistence = persistenceDef.newInstance();
            capability.setPersistence(persistence);
        }
       
        return capability;
    }
View Full Code Here

   
    public Capability newInstance()
    {
        Class theClass = getImplementationClass();
       
        Capability capability = (Capability)ReflectUtils.newInstance(theClass);
        capability.setCapabilityURI(getURI());
        capability.setMessageHandlers(getMessageHandlers());
        capability.setInitializationParameters(getInitializationParameters());
       
        PersistenceDefinition persistenceDef = getPersistenceDefinition();
       
        if (persistenceDef != null)
        {
            Persistence persistence = persistenceDef.newInstance();
            capability.setPersistence(persistence);
        }
       
        return capability;
    }
View Full Code Here

        Iterator i = getCapabilityDefinitions().iterator();
       
        while (i.hasNext())
        {
            CapabilityDefinition next = (CapabilityDefinition)i.next();
            Capability capability = next.newInstance();           
            resource.addCapability(capability);
        }
       
        return resource;
    }
View Full Code Here

     * @return the result of the invocation as org.w3c.dom.Element
     */
    public Element invoke(Element requestBody)
    {
        String action =  _environment.getAddressingContext().getAction()
        Capability capability = getCapabilityForAction(action);
       
        // Sanity check : is there a capability for the given action?
        if (capability == null)
        {
            SoapFault wsaFault = new SoapFault(
                String.format(
                    Messages.ACTION_NOT_SUPPORTED,
                    action,getContextPath()));

            wsaFault.setCode(SoapConstants.SENDER_QNAME);
            wsaFault.setSubCode(WsaConstants.ACTION_NOT_SUPPORTED_FAULT_QNAME);
           
            Element detail = XmlUtils.createElement(WsaConstants.PROBLEM_ACTION_QNAME);
            XmlUtils.setElement(detail, WsaConstants.ACTION_QNAME, action);
            wsaFault.setDetail(detail);
           
            LOGGER.error(
                Messages.QMAN_100020_ACTION_NOT_SUPPORTED,
                action,
                getContextPath());

            return wsaFault.toXML();
        }
       
        MessageHandler handler = capability.getMessageHandler(action);
        Method method = handler.getMethod();
       
        try
        {
          Object[]parameters = handler.fromXML(requestBody);
View Full Code Here

     */
    private void initializeCapabilities() throws SoapFault
    {
        for (Entry<String, Capability> entry : _capabilitiesByURI.entrySet())
        {
          Capability capability = entry.getValue();
      capability.initialize();
     
      for (Object action : capability.getActions())
      {
                _capabilitiesByAction.put((String)action, capability);
      }
     
      capability.initializeCompleted();
    }
    }
View Full Code Here

     */
    private void shutdownCapabilities() throws SoapFault
    {
        for (Entry<String,Capability> entry : _capabilitiesByURI.entrySet())
        {
          Capability capabilty = entry.getValue();
          capabilty.prepareShutdown();
          capabilty.shutdown();
    }       
    }   
View Full Code Here

TOP

Related Classes of org.apache.muse.core.Capability

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.